summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-19 22:14:45 +0000
committerKarl Berry <karl@freefriends.org>2016-03-19 22:14:45 +0000
commit0d26f0823e8224951350c294f343df779c68105f (patch)
treec5f912d689176b16edb334963708cc26542b4081 /Master/texmf-dist/source/latex/nameauth
parent619a3feba04810e6c12a1007bafb3209a6597071 (diff)
nameauth (19mar16)
git-svn-id: svn://tug.org/texlive/trunk@40080 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/nameauth')
-rw-r--r--Master/texmf-dist/source/latex/nameauth/nameauth.dtx2218
1 files changed, 1465 insertions, 753 deletions
diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
index 7bbff7330cf..eb0f6f57201 100644
--- a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
+++ b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
@@ -168,7 +168,7 @@ Running "make install" installs the files in the local TeX tree.
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{nameauth}
%<*package>
- [2016/01/05 v2.3 Name authority mechanism for consistency in text and index]
+ [2016/03/18 v2.42 Name authority mechanism for consistency in text and index]
%</package>
%<*driver>
\documentclass[11pt]{ltxdoc}
@@ -180,6 +180,8 @@ Running "make install" installs the files in the local TeX tree.
\usepackage{makeidx}
\usepackage{multicol}
\usepackage[toc]{multitoc}
+\usepackage{booktabs}
+\usepackage{setspace}
\usepackage{tikz}
\usepackage{ifxetex}
\usepackage{ifluatex}
@@ -351,6 +353,11 @@ Running "make install" installs the files in the local TeX tree.
\PretagName[Heinrich Wilhelm]{\textsc{Rühmann}}{Ruehmann, Heinrich Wilhelm}
\TagName{William, I}{|hyperpage}
\TagName[Charlie]{Chaplin}{|hyperpage}
+\TagName[John Maynard]{Keynes}{|hyperpage}
+\PretagName{Atatürk}{Ataturk}
+\TagName[Mustafa]{Kemal}{|hyperpage}
+\PretagName[Catherine]{\textsc{de'~Medici}}{de Medici, Catherine}
+\TagName[Catherine]{\textsc{de'~Medici}}{|hyperpage}
\IndexActual{=}
\begin{document}
\DocInput{\jobname.dtx}
@@ -358,7 +365,7 @@ Running "make install" installs the files in the local TeX tree.
%</driver>
% \fi
%
-% \CheckSum{2989}
+% \CheckSum{3249}
%
% \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
@@ -396,6 +403,9 @@ Running "make install" installs the files in the local TeX tree.
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.2}{2015/12/01}{Add interface hooks and docs; fix bugs}
% \changes{v2.3}{2016/01/05}{Improve docs and hooks; add features}
+% \changes{v2.4}{2016/03/15}{Add text tagging features, add generic hooks, and prevent recursion}
+% \changes{v2.41}{2016/03/17}{instantiate token registers only once}
+% \changes{v2.42}{2016/03/18}{do not use \cmd{\cmd} in section headings}
% \GetFileInfo{\jobname.dtx}
% \DoNotIndex{\@empty, \@gobble, \@period, \@token, \trim@spaces, \zap@space}
% \DoNotIndex{\begingroup, \bfseries, \bgroup, \csdef, \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}
@@ -415,8 +425,6 @@ Running "make install" installs the files in the local TeX tree.
% {\small\tableofcontents}
% \setlength{\parskip}{0.15\baselineskip plus .15\baselineskip minus .15\baselineskip}
%
-% \noindent This manual is designed to be compatible with A4 and US letter. Macro references are minimized for a ``clean'' index, showing how \textsf{nameauth} handles indexing.\clearpage
-%
% \section{Introduction}
%
% \subsection{Preliminaries}
@@ -437,7 +445,7 @@ Running "make install" installs the files in the local TeX tree.
% \item Accommodate the broadest set of names while minimizing keystrokes.
% \end{enumerate}
%
-% This manual performs something of a ``torture test'' on this package. You might want to avoid doing that if you are a beginner.
+% This manual performs something of a ``torture test'' on this package. You might want to avoid doing that if you are a beginner. It is designed to be compatible with A4 and US letter. Macro references are minimized for a ``clean'' index, showing how \textsf{nameauth} handles indexing.
%
% \textsf{Nameauth} depends on \textsf{etoolbox}, \textsf{ifxetex}, \textsf{ifluatex}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. It was tested with \texttt{latex,} \texttt{lualatex,} \texttt{pdflatex,} and \texttt{xelatex,} along with \texttt{makeindex} and \texttt{texindy.} This manual 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{} using \texttt{makeindex} and \texttt{gind.ist.}
%
@@ -565,6 +573,37 @@ Running "make install" installs the files in the local TeX tree.
%\end{enumerate}
%\clearpage
%
+% Another way to think about these over-generalized classes of names is to pretend that you know \emph{nothing at all} about names. How would you make sense out of the following?
+% \begin{quote}\small\NamesInactive\setstretch{1.2}
+% \begin{tabular}{lll}\toprule
+% Longer Name & Shorter Name & Indexed Name\\\midrule
+% \Wash & \Wash\ForgetName[George]{Washington} & Washington, George\\
+% \JRII & \JRII\ForgetName[John David]{Rockefeller, II} & Rockefeller, John David, II\\
+% \Name*[Clive Staples]{Lewis} & \LLewis & Lewis, Clive Staples\\
+% \Name*[Clive Staples]{Lewis} & \LJack\ForgetName[Clive Staples]{Lewis} & Lewis, Clive Staples\\
+% \Yamt & \Yamt\ForgetName{Yammamoto, Isoroku} & Yammamoto Isoroku\\
+% \Aris & \Aris\ForgetName{Aristotle} & Aristotle\\
+% \Eliz & \Eliz\ForgetName{Elizabeth, I} & Elizabeth I\\
+% \Attil & \Attil\ForgetName{Attila, the Hun} & Attila the Hun\\\bottomrule
+% \end{tabular}\NamesActive
+% \end{quote}
+%
+% The position of a name alone does not reveal whether it is a personal or family name. You have to know the cultures of the respective names, what the affixes mean, what triggers the different handling of affixes, and so on.
+%
+% Some of the humanities literature says that you should view the forenames as essential and the surnames as optional. Yet problems emerge when you have to drop the forename reference in professional or courteous writing, when you have to consider multiple alternate names, and when you have to consider those cases where the family name comes first.
+%
+% Nevertheless, if you notice a few consistent relationships, that will help you work out how the \textsf{nameauth} package encodes names:
+% \begin{enumerate}\small
+% \item The long form of a name corresponds with the reordered indexed form.
+% \item All Western index forms have surname(s) first, followed by a comma, then the forename(s), then a comma if needed, then the affix if it exists.
+% \item All Western name forms have both forename(s) and surname(s). The forename(s) can change/drop in the text, but not in the index.
+% \item Eastern name forms \meta{Surname(s)} \meta{Forename(s)}, with royal and ancient name forms \meta{Name(s)} \meta{Affix}, should not have commas in their index entries. The forename(s) and affixes cannot change (in this package), but they can drop in the text, but not the index.
+% \end{enumerate}
+% From this we conclude that all naming macros must be given the long name information in their arguments, then decide what to drop, change, and reorder depending on form and context. Since Eastern, ancient, and royal names share a set of similarities, they can allow context to disambiguate their use, over against Western names, which have to be handled differently.
+%
+% All this being said, the publisher's way of handling things may trump the (arguably) canonical way. This package allows some ``borderline'' options and name forms to accommodate that.\footnote{Some publishers not only use commas with Eastern forms in the index, but sometimes the forms are just wrong. For example, one sees \NamesInactive\Name{Sun, Yat-sen} \NamesActive indexed as ``Yat-sen, Sun'' (instead of either ``Sun, Yat-sen'' or ``Sun Yat-sen'') in Immanuel Geiss, \emph{Personen: Die biographische Dimension der Weltgeschichte}, Geschichte Griffbereit vol. 2 (Munich: Wissen Media Verlag, 2002), 720. The six-volume series is otherwise a helpful resource.}
+% The most prominent example includes the ``non-native'' Eastern names discussed in Sections~\ref{sec:options} and~\ref{sec:Eastern}.
+% \clearpage
% \section{Usage}
%
% \subsection{Package Options}
@@ -578,14 +617,14 @@ Running "make install" installs the files in the local TeX tree.
% \item Affect the syntax of names (commas, capitalization, and reversing)
% \item Typographic display of names (formatted or not, and how)
% \end{enumerate}
-% {\hrulefill\bfseries Default options are in boldface.\hrulefill}
+% \begin{tabular}{p{\textwidth}}\toprule\hfil\bfseries Default options are in boldface.\hfil\\\bottomrule\end{tabular}
%
% \begin{center}\Large\bfseries Enable/Disable Features\end{center}
%
% \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.\\[2ex]
+% \quad\bfseries\texttt{mainmatter} & \bfseries Choose ``main-matter names'' and formatting hooks (see formatting options below), starting at the beginning of a document.\\[1ex]
+% \quad\texttt{frontmatter} & Choose ``front-matter names'' and hooks; retain syntactic formatting.\\[2ex]
% \end{tabular}\\
% The default |mainmatter| option 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, but they implement two completely separate systems of first/subsequent names. These systems manage names in separate contexts. See Section~\ref{sec:DisableFormat}.\bigskip
%
@@ -641,13 +680,16 @@ Running "make install" installs the files in the local TeX tree.
%
% \begin{center}\Large\bfseries Typographic Display of Names\end{center}
%
-% Section~\ref{sec:formatting} explains in greater detail that typographic display is different from the syntactic formatting of names and occurs after syntactic formatting is complete. This package is designed with type hierarchies in mind. See Robert Bringhurst, \emph{The Elements of Typographic Style}, version 3.2 (Point Roberts, Washington: Hartley \& Marks, 2008), 53--60.
+% Section~\ref{sec:formatting} explains in greater detail that typographic display is different from the syntactic formatting of names and occurs after syntactic formatting is complete. This package is designed with type hierarchies in mind.\footnote{See Robert Bringhurst, \emph{The Elements of Typographic Style}, version 3.2 (Point Roberts, Washington: Hartley \& Marks, 2008), 53--60.}
%
-% Even though English typography was the design choice due to native access (for me) and global reach (thanks, England), a stint in Germany helped to make me aware of continental typography. Especially in recent versions, one can adapt this package for use in Continental and other typographic standards, as Section~\ref{sec:formatting} discusses. One must use sort tags, as Section~\ref{sec:IndexSort} explains.
+% As of version 2.4, ``typographic formatting'' has become a generalized concept of ``name post-processing'' via the hook macros \cmd{\NamesFormat,} \cmd{\MainNameHook,} and \cmd{\FrontNameHook.} Sections~\ref{sec:formatting} and~\ref{sec:moreC} offer substantially more complex possibilities for such hooks.\footnote{I drew some inspiration from the typography in Bernhard Lohse, \emph{Luthers Theologie} (G\"ottingen: Vandenhoeck \& Ruprecht, 1995) and the five-volume series by Jaroslav J. Pelikan Jr., The Christian Tradition: A History of the Development of Doctrine (Chicago: Chicago UP, 1971--89). Each volume in the series has its own title.}
%
-% Continental standards require you to know the surname in advance and draw formatting into the syntactic elements of the surname. By default, \textsf{nameauth} uses a ``serendipitous ambiguity'' of ancient, Eastern, and suffixed name forms handled by the \meta{Surname, affix} pattern that is resolved subtly by several factors. I burden Continental users with a few more keystrokes in order to minimize keystrokes among the broadest group of users and names.
+% Even though English typography was the design choice for this package, one can use this package in Continental (German, etc.) and other typographic standards, as Section~\ref{sec:formatting} discusses. One must use sort tags, as Section~\ref{sec:IndexSort} explains.
%
-% If you intend to use this package for Continental publishing where the surname is formatted with small caps in the running text and the index, use the |noformat| option. Otherwise, the options below are meant generally for applications in English typography. The default is |smallcaps| because this package was developed to aid my editing and translation of older German and Latin documents into English. I do apologize for any inconvenience in design choices.\bigskip
+% Continental standards include formatting surnames only. However, \textsf{nameauth} uses some ambiguous name forms.\footnote{By default, \textsf{nameauth} uses a ``serendipitous ambiguity'' of ancient, Eastern, and suffixed name forms handled by the \meta{Surname, affix} pattern that is resolved subtly by several factors.}
+% Continental users must add control sequences directly in the naming macro arguments. In that case, use the |noformat| option and the simplified interface to minimize keystrokes. Continental users may lose some capitalization features; see Section~\ref{sec:standards}.
+%
+% Otherwise, the options below are meant generally for applications in English typography. The default is |smallcaps| because this package was developed to aid my editing and translation of older German and Latin documents into English. I do apologize for any inconvenience in design choices.\bigskip
%
% \noindent{\large\bfseries Formatting Attributes}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
@@ -657,9 +699,6 @@ Running "make install" installs the files in the local TeX tree.
% \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.\\[2ex]
% \end{tabular}\\
-%
-% Section~\ref{sec:formatting} offers even more possibilities for presenting the first use of names. That includes typographic formatting that also adds names in margins.\footnote{Two books that helped my thinking about such typographic concepts include Bernhard Lohse, \emph{Luthers Theologie} (G\"ottingen: Vandenhoeck \& Ruprecht, 1995) and the five-volume series by Jaroslav J. Pelikan Jr., The Christian Tradition: A History of the Development of Doctrine (Chicago: Chicago UP, 1971--89). Each volume in the series has its own title.\\\indent\quad Given the use of small caps in the text and index in Lohse's volume, I looked at several possibilities and arrived at the current solution for Continental users. Pelikan's volumes pointed me to the idea of a typographic first use of names that could well be served by a margin paragraph. Being a history enthusiast, I implemented that design idea in this manual.}
-% This allows one to implement some creative solutions for presenting names.
% \clearpage
%
% \subsection{Quick Start Guide}
@@ -709,10 +748,10 @@ Running "make install" installs the files in the local TeX tree.
% \end{scope}
% \end{tikzpicture}\\
% Usual forms:\\[2ex]\small
-% \cmd{\Name}\oarg{FNN}\marg{SNN}\hfill|\Name[George]{Washington}|\IndexName[George]{Washington}\\
+% \cmd{\Name}\oarg{FNN}\marg{SNN}\hfill|\Name[George]{Washington}|\IndexName[George]{Washington}\\[1ex]
% \cmd{\Name}\oarg{FNN}\marg{SNN|,| affix}\hfill|\Name[John David]{Rockefeller, II}|\IndexName[John David]{Rockefeller, II}\\[2ex]
% You must include the \meta{FNN} field with alternate forenames. The \meta{Alternate names} are swapped with the \meta{FNN}, but only in the body text:\\[1ex]
-% \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\\\hbox{}\hfill |\Name[Bob]{Hope}[Leslie Townes]|\IndexName[Bob]{Hope}\\\hbox{}\hfill |\Name[Clive Staples]{Lewis}[C.S.]|\IndexName[Clive Staples]{Lewis}\\
+% \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\\\hbox{}\hfill |\Name[Bob]{Hope}[Leslie Townes]|\IndexName[Bob]{Hope}\\\hbox{}\hfill |\Name[Clive Staples]{Lewis}[C.S.]|\IndexName[Clive Staples]{Lewis}\\[1ex]
% \cmd{\Name}\oarg{FNN}\marg{SNN|,| affix}\oarg{Alternate names}\\\hbox{}\hfill |\Name[John David]{Rockefeller, IV}[Jay]|\IndexName[John David]{Rockefeller, IV}\\[2ex]\normalsize
% 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.
% \end{quote}\medskip
@@ -817,27 +856,27 @@ Running "make install" installs the files in the local TeX tree.
% \end{scope}
% \end{tikzpicture}
% Usual form:\\[2ex]\small
-% \cmd{\Name}\marg{SNN}\hfill|\Name{Aristotle}|\IndexName{Aristotle}\\
+% \cmd{\Name}\marg{SNN}\hfill|\Name{Aristotle}|\IndexName{Aristotle}\\[1ex]
% \cmd{\Name}\marg{SNN, affix}\hfill|\Name{Elizabeth, I}|\IndexName{Elizabeth, I}\\
% \hbox{}\hfill|\Name{Attila, the Hun}|\IndexName{Attila, the Hun}\\[2ex]\normalsize
% These forms are used for royalty, ancient figures, and other monomyms with or without suffixes.\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 takes the form \cmd{\Name}\marg{Mononym}\oarg{affix}. Cf. Section~\ref{sec:obsolete}.
% \end{quote}
%
-% The main interface allows one to use \cmd{\Name}\meta{arguments} as a base for many other package macros. For example, all these are variants of a base pattern, where \meta{prefix macro} consist of one or more of \cmd{\CapThis,} \cmd{\CapName,} \cmd{\RevName,} \cmd{\RevComma,} \cmd{\ShowComma,} and \cmd{\KeepAffix:}
+% Many commands in the main interface are variants of a base pattern, where \meta{prefix macro} consist of one or more of \cmd{\CapThis,} \cmd{\CapName,} \cmd{\RevName,} \cmd{\RevComma,} \cmd{\ShowComma,} and \cmd{\KeepAffix:}
%
-% \begin{center}\small
-% \begin{tabular}{r@{\,}r@{}c@{\,}c@{ }l}
+% \begin{center}\small\setstretch{1.1}
+% \begin{tabular}{r@{\,}r@{}c@{\,}c@{ }l}\toprule
% \meta{prefix macro} & \cmd{\Name} & & \meta{arguments} \\
% \meta{prefix macro} & \cmd{\Name} & |*| & \meta{arguments} \\
-% \meta{prefix macro} & \cmd{\FName} & & \meta{arguments} \\\hline
+% \meta{prefix macro} & \cmd{\FName} & & \meta{arguments} \\\midrule
% & \cmd{\IndexName} & & \meta{arguments} \\
% & \cmd{\ForgetName} & & \meta{arguments} \\
% & \cmd{\SubvertName} & & \meta{arguments} \\
% & \cmd{\PretagName} & & \meta{arguments} & \meta{sort key}\\
% & \cmd{\TagName} & & \meta{arguments} & \meta{tag}\\
% & \cmd{\UntagName} & & \meta{arguments} \\
-% & \cmd{\ExcludeName} & & \meta{arguments} \\
+% & \cmd{\ExcludeName} & & \meta{arguments} \\\bottomrule
% \end{tabular}
% \end{center}
% \clearpage
@@ -850,7 +889,7 @@ Running "make install" installs the files in the local TeX tree.
%
% The simplified interface 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{\%.}} The italicized comments at right are not part of the example proper, but are there for explanation. Macro fields have uniform widths only to help compare argument types.
%
-% \begin{quote}\small
+% \begin{quote}\small\setstretch{1.2}
% |\begin{nameauth}|\\
% | \<| \meta{cseq1} |&| \meta{FNN} |&| \meta{SNN}\hphantom{\textit{affix, }} |& >|\hfill\emph{Western}\footnote{This is also the form used with ``non-native'' Eastern names using reversing macros, but leaving them in Western form in the index.}\\
% | \<| \meta{cseq2} |&| \meta{FNN} |&| \meta{SNN, affix} |& >|\hfill\emph{Western}\\
@@ -877,7 +916,7 @@ Running "make install" installs the files in the local TeX tree.
%
% The example below illustrates a fairly complete set of names, apart from some special cases covered elsewhere in the manual:
%
-% \begin{quote}\small
+% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\[0.2ex]
% | \< Wash & George & Washington & >|\hfill\emph{Western}\\
% | \< Soto & Hernando & de Soto & >|\hfill\emph{particle}\\
@@ -896,7 +935,7 @@ Running "make install" installs the files in the local TeX tree.
%
% Now we see how this works in the body text, which you can compare with the index. A dagger (\dag) indicates an Eastern name with a Western index form.
%
-% \begin{multicols}{2}\small
+% \begin{multicols}{2}\small\setstretch{1.1}
% \noindent\textbf{Basic Uses:}\\
% |\Wash|\hfill \Wash \\
% |\LWash|\hfill \LWash \\
@@ -926,23 +965,23 @@ Running "make install" installs the files in the local TeX tree.
% |\SJack|\hfill \SJack\columnbreak\\
% \textbf{Ancient:}\\
% |\Aris|\hfill \Aris \\
-% |\Aris|\hfill \Aris \\[3ex]
+% |\Aris|\hfill \Aris \\[3.2ex]
% \textbf{Medieval/Royal:}\\
% |\Eliz|\hfill \Eliz \\
% |\Eliz|\hfill \Eliz \\
% |\Atil|\hfill \Attil \\
-% |\Atil|\hfill \Attil \\[3ex]
+% |\Atil|\hfill \Attil \\[3.3ex]
% \textbf{Western / Western Index:}\\
% |\Konoe|\hfill \Konoe \\
% |\LKonoe|\hfill \LKonoe \\
-% |\Konoe|\hfill \Konoe \\[3ex]
+% |\Konoe|\hfill \Konoe \\[3.3ex]
% \textbf{Eastern / Western Index:}\\
% |\CapName\RevName\LKonoe|\\\hbox{}\hfill \indent\dag\CapName\RevName\LKonoe \\
-% |\CapName\Konoe|\hfill \dag\CapName\Konoe \\[3.1ex]
+% |\CapName\Konoe|\hfill \dag\CapName\Konoe \\[3.2ex]
% \textbf{Eastern / Eastern Index:}\\
% |\CapName\Yamt|\hfill \CapName\Yamt \\
% |\CapName\LYamt|\hfill \CapName\LYamt \\
-% |\CapName\Yamt|\hfill \CapName\Yamt \\[3.1ex]
+% |\CapName\Yamt|\hfill \CapName\Yamt \\[3.3ex]
% \textbf{Western / Eastern Index:}\\
% |\RevName\LYamt|\hfill \RevName\LYamt \\
% |\Yamt|\hfill \Yamt
@@ -950,14 +989,14 @@ Running "make install" installs the files in the local TeX tree.
%
% Sections~\ref{sec:standards}, \ref{sec:accents}, and~\ref{sec:IndexSort} deal with the pitfalls of accents and capitalization, as well as why you should use \cmd{\PretagName} for any name with control sequences or extended Unicode under NFSS. This becomes very important when authors and publishers use medieval names as Western names.
%
-% When tagging or pre-tagging names (Section~\ref{sec:IndexSort}), the \meta{Alternate names} field has no effect on index tags. \cmd{\JRIV} and \cmd{\JayR} need only one tag:\\[1ex] \hbox{}\qquad|\TagName[John David]{Rockefeller, IV}{|\meta{something}|}|\\[1ex] Likewise, \cmd{\Lewis} and \cmd{\Jack} need only one tag:\\[1ex]\hbox{}\qquad|\TagName[Clive Staples]{Lewis}{|\meta{something}|}|\\[1ex] Only in the \meta{Alternate names} field can one use control sequences without them affecting index sorting, unlike in the other fields. If the \meta{FNN} field is empty, then you have the situation below.
+% When index tagging or pre-tagging names (Section~\ref{sec:IndexSort}), the \meta{Alternate names} field has no effect on index tags. \cmd{\JRIV} and \cmd{\JayR} need only one tag:\\[1ex] \hbox{}\qquad|\TagName[John David]{Rockefeller, IV}{|\meta{something}|}|\\[1ex] Likewise, \cmd{\Lewis} and \cmd{\Jack} need only one tag:\\[1ex]\hbox{}\qquad|\TagName[Clive Staples]{Lewis}{|\meta{something}|}|
%
% \subsubsection{Older Syntax}
% \label{sec:obsolete}
%
-% An ``obsolete'' syntax remains for backward compatibility with early versions of \textsf{nameauth} and with the \texttt{comma} option. Please avoid mixing the older and newer forms to avoid possible confusion and error.
+% An ``obsolete'' syntax remains for backward compatibility with early versions of \textsf{nameauth} and with the \texttt{comma} option. Please avoid mixing the older and newer forms to avoid possible confusion and error. For example, the older syntax causes the \meta{Alternate names} field in the index tagging functions to become as significant as \meta{FNN}, including the need to pretag such names.
%
-% The \texttt{comma} option causes Western names with affixes to have a comma. Yet that also causes Eastern and ancient names, or any names using a pattern like \meta{SNN, affix} or \meta{SNN, FNN} to display a comma where it should not occur. In that case the older syntax is needed. The old form lacks some error checking and robustness contained in the new syntax and limits the use of several macros, including \cmd{\AKA.} Section~\ref{sec:error} offers some cautions about the old syntax, as do many places in this manual. The form is:
+% The \texttt{comma} option causes Western names with affixes to have a comma. Yet that also causes Eastern and ancient names, or any names using a pattern like \meta{SNN, affix} or \meta{SNN, FNN} to display a comma where it should not occur. The old form lacks some error checking and robustness contained in the new syntax and limits the use of several macros, including \cmd{\AKA.} Section~\ref{sec:error} offers some cautions about the old syntax, as do many places in this manual. The form is:
%
% \begin{quote}
% |\Name{Dagobert}[I]|\hfill\emph{royal name}\\
@@ -996,20 +1035,20 @@ Running "make install" installs the files in the local TeX tree.
%
% \noindent Here we see how the syntax works:
%
-% \begin{quote}\small
-% \begin{tabular}{ll}\hline
-% {\large\strut}|\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\
-% {\large\strut}|\Name*[Albert]{Einstein}| & \Name*[Albert]{Einstein}\\
-% {\large\strut}|\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\\hline
-% {\large\strut}|\Name{Confucius}| & \Name{Confucius}\\
-% {\large\strut}|\Name*{Confucius}| & \Name*{Confucius}\\
-% {\large\strut}|\Name{Confucius}| & \Name{Confucius}\\\hline
-% {\large\strut}|\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\
-% {\large\strut}|\Name*[M.T.]{Cicero}[Marcus Tullius]| & \Name*[M.T.]{Cicero}[Marcus Tullius]\\
-% {\large\strut}|\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\\hline
-% {\large\strut}|\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\
-% {\large\strut}|\Name*{Charles, the Bald}| & \Name*{Charles, the Bald}\\
-% {\large\strut}|\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\\hline
+% \begin{quote}\small\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% |\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\
+% |\Name*[Albert]{Einstein}| & \Name*[Albert]{Einstein}\\
+% |\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\\midrule
+% |\Name{Confucius}| & \Name{Confucius}\\
+% |\Name*{Confucius}| & \Name*{Confucius}\\
+% |\Name{Confucius}| & \Name{Confucius}\\\midrule
+% |\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\
+% |\Name*[M.T.]{Cicero}[Marcus Tullius]| & \Name*[M.T.]{Cicero}[Marcus Tullius]\\
+% |\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\\midrule
+% |\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\
+% |\Name*{Charles, the Bald}| & \Name*{Charles, the Bald}\\
+% |\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\\bottomrule
% \end{tabular}
% \end{quote}
%
@@ -1046,18 +1085,18 @@ Running "make install" installs the files in the local TeX tree.
% \cmd{\makeatletter}\cmd{\@nameauth@FirstFormattrue}\cmd{\makeatother}|%|\\
% \cmd{\FName}\oarg{FNN}\marg{SNN}
% \end{quote}
-% By design, \cmd{\FName} \emph{never} prints Eastern personal names so that ancient names also work (cf. Section~\ref{sec:PatRef}). Examples of general use include: \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
-%
-% \begin{quote}\small
-% \begin{tabular}{ll}\hline
-% {\large\strut}|\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\
-% {\large\strut}|\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\\hline
-% {\large\strut}|\FName{Confucius}| & \FName{Confucius}\\
-% {\large\strut}|\FName{Confucius}|& \FName{Confucius}\\\hline
-% {\large\strut}|\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\
-% {\large\strut}|\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\\hline
-% {\large\strut}|\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\
-% {\large\strut}|\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\\hline
+% By design, \cmd{\FName} \emph{never} prints Eastern personal names, so that ancient names also work (cf. Section~\ref{sec:PatRef}). Examples of general use include: \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
+%
+% \begin{quote}\small\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% |\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\
+% |\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\\midrule
+% |\FName{Confucius}| & \FName{Confucius}\\
+% |\FName{Confucius}|& \FName{Confucius}\\\midrule
+% |\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\
+% |\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\\midrule
+% |\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\
+% |\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\\bottomrule
% \end{tabular}\\
% \end{quote}
%
@@ -1087,14 +1126,14 @@ Running "make install" installs the files in the local TeX tree.
%
% 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 between the comma and affix are ignored. Extra commas have no effect. Other name types include royal, medieval, and Eastern names:
%
-% \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}\\
-% {\large\strut}|\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\\hline
+% \begin{quote}\small\ForgetName{Sun, Yat-sen}\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% |\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\
+% |\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\\midrule
+% |\Name{Louis, XIV}| & \Name{Louis, XIV}\\
+% |\Name{Louis, XIV}| & \Name{Louis, XIV}\\\midrule
+% |\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\
+% |\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\\bottomrule
% \end{tabular}
% \end{quote}
%
@@ -1107,14 +1146,14 @@ Running "make install" installs the files in the local TeX tree.
% The \texttt{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.\bigskip
%
% \noindent{\large\bfseries Compare Older Syntax}\\[2ex]
-% Avoid using the older syntax, shown below, except with the \texttt{comma} option. The older syntax prevents Eastern and ancient names that use the \meta{SNN, affix} pattern from having unwanted commas in them with the \texttt{comma} option or with \cmd{\ShowComma.} \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms. These older forms include:
-%
-% \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
-% {\large\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\
-% {\large\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\\hline
+% Avoid using the older syntax, shown below, except with the \texttt{comma} option. The older syntax causes Eastern and ancient names that use the \meta{SNN, affix} pattern to have unwanted commas in them with the \texttt{comma} option or with \cmd{\ShowComma.} \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms:
+%
+% \begin{quote}\small\ForgetName{Henry}[VIII]\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% |\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\
+% |\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\\midrule
+% |\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\
+% |\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\\bottomrule
% \end{tabular}
% \end{quote}
% These older forms work because no \meta{FNN} are present. Otherwise you would get weird nicknames. Again, to avoid potential frustration, please avoid using the older syntax unless you need it.
@@ -1125,48 +1164,52 @@ Running "make install" installs the files in the local TeX tree.
%
% 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 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.\bigskip
+% 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.\medskip
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
-% 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}.
+% The ``smart'' reverse output mechanism converts between Western and Eastern forms in the text, but not the index. Pick non-native mode for Western-format index entries. Pick native mode for Eastern forms in the index. 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}.
+%
+% Please\marginpar{\small\raggedleft\cmd{\global}} note that \cmd{\ReverseActive} and \cmd{\ReverseInactive} can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.
%
% 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}\small
-% \begin{tabular}{lll}\hline
-% {\large\strut} & \emph{unchanged} & |\RevName|\\
-% {\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*{Yohko}| & \Name*{Yohko} & \RevName\Name*{Yohko}\\\hline
+%
+% \begin{quote}\small\NamesInactive\setstretch{1.2}
+% \begin{tabular}{lll}\toprule
+% & \emph{unchanged} & |\RevName|\\\midrule
+% \dag|\Name*[Aiko]{Nakano}| & \dag\Name*[Aiko]{Nakano} & \dag\RevName\Name*[Aiko]{Nakano}\\
+% |\Name*{Arai, Akino}| & \Name*{Arai, Akino} & \RevName\Name*{Arai, Akino}\\
+% (|\Name*{Ishida}[Yoko]|) & (\Name*{Ishida}[Yoko]) & (\RevName\Name*{Ishida}[Yoko])\\
+% |\Name*{Yohko}| & \Name*{Yohko} & \RevName\Name*{Yohko}\\\bottomrule
% \end{tabular}
-% \end{quote}
-% \NamesActive\medskip
+% \end{quote}\smallskip
%
% \DescribeMacro{\AllCapsActive}
% \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 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:
+% 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}\dots.
%
-% \NamesInactive
-% \begin{quote}\small
-% \begin{tabular}{l@{ }l@{ }l}\hline
-% {\large\strut} & \emph{unchanged} & |\CapName\RevName|\\
-% {\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*{Yohko}| & \CapName\Name*{Yohko} & \CapName\RevName\Name*{Yohko}\\\hline
+% Both\marginpar{\small\raggedleft\cmd{\global}} \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} have the same local restrictions as the other state-changing macros. Use \cmd{\global} to force a global effect.
+%
+% In the example below, 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:
+%
+% \begin{quote}\small\NamesInactive\setstretch{1.2}
+% \begin{tabular}{l@{ }l@{ }l}\toprule
+% & \emph{unchanged} & |\CapName\RevName|\\\midrule
+% \dag|\Name*[Yoko]{Kanno}| & \dag\CapName\Name*[Yoko]{Kanno} & \dag\CapName\RevName\Name*[Yoko]{Kanno}\\
+% |\Name*{Shikata, Akiko}| & \CapName\Name*{Shikata, Akiko} & \CapName\RevName\Name*{Shikata, Akiko}\\
+% (|\Name*{Nogawa}[Sakura]|) & (\CapName\Name*{Nogawa}[Sakura]) & (\CapName\RevName\Name*{Nogawa}[Sakura])\\
+% |\Name*{Yohko}| & \CapName\Name*{Yohko} & \CapName\RevName\Name*{Yohko}\\\bottomrule
% \end{tabular}
-% \end{quote}
-% \NamesActive\smallskip
+% \end{quote}\smallskip
%
-% 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. For caps in the text and index see Section~\ref{sec:formatting}.\clearpage
+% 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. For caps in the text and index see Section~\ref{sec:formatting}.
%
% \subsection{Other Naming Topics}
-% {\hfill\large\bfseries Language-Related Issues\hfill}\vspace{-2ex}
+% {\hfill\large\bfseries\emph{Language-Related Issues}\hfill}\vspace{-2ex}
+%
% \subsubsection{Particles}
% \label{sec:standards}
%
@@ -1175,11 +1218,17 @@ Running "make install" installs the files in the local TeX tree.
% \DescribeMacro{\CapThis}
% 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}. |\CapThis\Name[Walter]{de la Mare}| lets you capitalize \emph{de} when at the beginning of a sentence. \CapThis\Name[Walter]{de la Mare} will think it fair. \CapThis\Soto\ (using |\CapThis\Soto| from Section~\ref{sec:simplestart}) would agree.
%
-% Connect one-character particles with surnames via |~| or \cmd{\nobreakspace} to avoid bad breaks and prevent \cmd{\CapThis} from eating the space between the particle and the surname. There are no issues when particles have two or more characters in them, as do those listed above.\medskip
+% It is a good idea to put |~| or \cmd{\nobreakspace} between particles and surnames to avoid bad breaks. This also prevents \cmd{\CapThis} from eating the space between a one-character particle and the surname (Section \ref{sec:Unicode}).
+%
+% The Continental style of handling surnames (Section~\ref{sec:formatting}) does not work with the capitalization macros. In the case of names like \Name[Catherine]{\textsc{de'~Medici}} use |\Name[Catherine]{\textsc{de'~Medici}}| and, instead of the capping macros, |\textsc{De'~Medici}\IndexName[Catherine]{\textsc{de'~Medici}}.|\medskip
%
% \DescribeMacro{\AccentCapThis}
-% \cmd{\CapThis} (and \cmd{\AccentCapThis}) always work and give the same desired results with \texttt{xelatex} and \texttt{lualatex}. With \texttt{pdflatex} you \emph{must} use \cmd{\AccentCapThis} when the first letter of the particle is an extended Unicode character.
-% \begin{quote}
+% With \texttt{pdflatex} and \textsf{inputenc}, use \cmd{\CapThis} when the first character of the particle is \texttt{A--z} (basic Latin). Use \cmd{\AccentCapThis} when the first character is extended Latin or other Unicode (see Section \ref{sec:Unicode}). Otherwise, with \texttt{pdflatex} \cmd{\CapThis} will fail if an extended Unicode character is the first letter of a particle.
+%
+% For example, \emph{L'} and \emph{d'} are two separate glyphs each, while \emph{Ľ} and \emph{ď} are one Unicode glyph each. Even with \texttt{xelatex} and \texttt{lualatex}, you would put a non-breaking space between the particle and the name because the particle is only one character. With \texttt{pdflatex} you also must use \cmd{\AccentCapThis.}
+%
+% Another example deals with particles and name forms:
+% \begin{quote}\small
% |\PretagName{Thomas, à~Kempis}{Thomas a Kempis}|\hfill\emph{medieval}\\
% |\PretagName[Thomas]{à~Kempis}{Thomas a Kempis}|\hfill\emph{Western}\\
% |\begin{nameauth}|\\[0.2ex]
@@ -1187,61 +1236,65 @@ Running "make install" installs the files in the local TeX tree.
% | \< KempW & Thomas & à~Kempis & >|\hfill\emph{Western}\\
% |\end{nameauth}|
% \end{quote}
+% The medieval forms \KempMed\ and \KempMed\ use the particle as the first part of an affix. Please do not confuse the medieval forms with the Western forms. Otherwise you will get similar names with different index entries.\footnote{Properly speaking, ``à~Kempis'' and ``Aquinas'' are not surnames but suffixed place names. They create different index entries from Western names and look different in the text.}
%
-% You do not need either \cmd{\CapThis} or \cmd{\AccentCapThis} if you use the medieval forms \KempMed\ and \KempMed. It is important that you do not mix medieval and Western forms to avoid odd name forms and multiple index entries.\footnote{Properly speaking, ``à~Kempis'' and ``Aquinas'' are not surnames but suffixed place names. They create different index entries from Western names and look different in the text.}
+% \IndexInactive
+% Many people use medieval affixes as Western surnames: \SubvertName[Thomas]{à~Kempis}``\AccentCapThis\KempW.''\footnote{This treatment of medieval names, along with the handling of Eastern names, seems to be one of the most frequently ``abused'' issues in the academic literature that I know. In order to achieve simplicity in work flow or conformity, authors and publishers will take some fairly ethnocentric or heavy-handed approaches to names. The \textsf{nameauth} package will accommodate those approaches, even if I personally disagree with them.}
+% To get that form, use |\AccentCapThis\KempW.|
+% \clearpage
%
-% \IndexInactive%
-% Nevertheless, many people refer to such names as Western surnames, which purists might view as being incorrect. If you need to use the Western variant, you might have to use |\AccentCapThis\KempW| to get \SubvertName[Thomas]{à~Kempis}``\AccentCapThis\KempW.''
+% Section~\ref{sec:Unicode} explains in detail why the following problems can occur:
% \begin{itemize}\small
-% \item Use \cmd{\PretagName} in all names with extended Unicode characters under \texttt{pdflatex}, NFSS, \textsf{inputenc}, and \texttt{makeindex}. See Section~\ref{sec:IndexSort}.
-% \item |\CapThis\KempW| halts execution with \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}.} Section~\ref{sec:accents} explains why.
-% \item |\AccentCapThis\Name[Thomas]{à Kempis}| gives ``\AccentCapThis\Name[Thomas]{à Kempis}'' (space removed) in the absence of a non-breaking space or an explicit \cmd{\space.} This is due to \TeX\ handling ``|#1#2#3\relax|.''
-% \item Under \texttt{pdflatex} \cmd{\AccentCapThis} should not be used if the first character of a particle is not accented. |\AccentCapThis\Soto| gives \AccentCapThis\Soto. A particle like |lé| would cause \cmd{\AccentCapThis} to fail. Section~\ref{sec:accents} explains more.
+% \item |\CapThis\KempW| halts execution with \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}.}
+% \item |\AccentCapThis\Name[Thomas]{à Kempis}| gives ``\AccentCapThis\Name[Thomas]{à Kempis}'' (space removed). Instead, use |\AccentCapThis\Name[Thomas]{à~Kempis}.|
+% \item Under \texttt{pdflatex} \cmd{\AccentCapThis} fails with particles like |lé|\,---\, use \cmd{\CapThis} in that case to avoid breaking the \emph{second} character.
+% \item |\AccentCapThis\Soto| gives \AccentCapThis\Soto. Only use it with accented first letters.
% \end{itemize}
-% \IndexActive%
-% To summarize, use non-breaking spaces when needed. With \texttt{pdflatex} and \textsf{inputenc}, use \cmd{\CapThis} when the first character of the particle is \texttt{a--z.} Use \cmd{\AccentCapThis} when the first character is extended Unicode.
-% \clearpage
-% You\marginpar{\small\raggedleft Alternates} could use name forms with braces, like |\Name[Thomas]{{à}~Kempis}|, and control sequences, like |\Name[Thomas]{\`a~Kempis}|. Using those forms consistently, with \cmd{\PretagName,} would require you to use \cmd{\CapThis,} never \cmd{\AccentCapThis}. That is because both |{à}| and |\`a| are passed as one macro argument, while under NFSS and \textsf{inputenc}, |à| is passed as two arguments in ``|#1#2#3\relax|'' (see Section~\ref{sec:accents}).
+% \IndexActive
+%
+% You\marginpar{\small\raggedleft Alternates} could use name forms with braces, like |\Name[Thomas]{{à}~Kempis}|, and control sequences, like |\Name[Thomas]{\`a~Kempis}|. Using those forms consistently, with \cmd{\PretagName,} would require you to use \cmd{\CapThis,} never \cmd{\AccentCapThis}. See Section~\ref{sec:Unicode} for more details.
%
% Non-English contexts do not necessarily bind particles to surnames. Using \cmd{\Name} and \cmd{\FName} with alternate forenames helps address this and may skirt the particle capitalization issue. See also Section~\ref{sec:Particles}.
%
% \subsubsection{Formatting Initials}
%
-% Omit spaces between initials if possible; see also Bringhurst's \emph{Elements of Typographic Style}. If your publisher wants spaces between initials, try putting thin spaces |\,| between them. Remember also to use \cmd{PretagName} to get the correct index sorting:
+% Omit spaces between initials if possible; see also Bringhurst's \emph{Elements of Typographic Style}. If your publisher wants spaces between initials, try putting thin spaces |\,| between them. Use \cmd{\PretagName} to get the correct index sorting:
% \begin{quote}
% |\PretagName[E.\,B.]{White}{White, E. B.}|\\
% |\begin{nameauth}|\\
% | \< White & E.\,B. & White & >|\\
-% |\end{nameauth}|\\
+% |\end{nameauth}|
% \begin{nameauth}
% \< White & E.\,B. & White & >
% \end{nameauth}
-%
+% \end{quote}
+% \begin{quote}
+% \def\sep{\vrule width0.5pt\kern-0.5pt}%
% \begin{tabular}{ll}\hline
-% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\,\vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White} and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\,\vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\
+% & \hphantom{\textsc{E.}}\sep\,\sep\hphantom{\textsc{B.}}\sep\hphantom{\ }\sep\hphantom{\textsc{White}\ and\ }\hphantom{E.}\sep\,\sep\hphantom{B.}\sep\hphantom{\ }\sep\hphantom{White}\\
% \cmd{\White} and \cmd{\LWhite} & \White\ and \LWhite\\
-% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\,\vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White} and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\,\vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\\hline
-% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\ \vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White}\,and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\ \vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\
-% Normal:\hfill & \textsc{E. B. White}\,and E. B. White.\\
-% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\ \vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White}\,and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\ \vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\\hline
+% & \hphantom{\textsc{E.}}\sep\,\sep\hphantom{\textsc{B.}}\sep\hphantom{\ }\sep\hphantom{\textsc{White}\ and\ }\hphantom{E.}\sep\,\sep\hphantom{B.}\sep\hphantom{\ }\sep\hphantom{White}\\\hline
+% & \hphantom{\textsc{E.}}\sep\ \sep\hphantom{\textsc{B.}}\sep\ \sep\hphantom{\textsc{White} and\ }\hphantom{E.}\sep\ \sep\hphantom{B.}\sep\ \sep\hphantom{White}\\
+% Normal text:\hfill & \textsc{E. B. White} and E. B. White.\\
+% & \hphantom{\textsc{E.}}\sep\ \sep\hphantom{\textsc{B.}}\sep\ \sep\hphantom{\textsc{White} and\ }\hphantom{E.}\sep\ \sep\hphantom{B.}\sep\ \sep\hphantom{White}\\\hline
% \end{tabular}
% \end{quote}
%
% \subsubsection{Hyphenation}
%
-% The simplified interface trivializes the consistent insertion of optional hyphens in names, as we see below:
+% The simplified interface trivializes the insertion of optional hyphens in names, but such hyphens must be used consistently in all the naming macros:
%
% \begin{quote}
% |\begin{nameauth}|\\
% | \< Bier & Johann & Bier\-mann & >|\\
% |\end{nameauth}|
% \end{quote}
-% We get \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:
+% We get \Bier\ and \Bier. English hyphenation can break ie-pairs and maybe others. One also can fix bad breaks with the \textsf{babel} or \textsf{polyglossia} packages. This moves the solution from ``quick and dirty'' to elegant. \Name[John]{Strietelmeier} can break badly in English, as you see. Using \textsf{babel}, we get:
% \begin{quote}
-% |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}|
+% \newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}%
+% |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}|\\
+% |\de{\Name*[John]{Strietelmeier}}|\\
+% \de{\Name*[John]{Strietelmeier}}
% \end{quote}
%
% \subsubsection{Listing by Surname}
@@ -1250,86 +1303,66 @@ Running "make install" installs the files in the local TeX tree.
%\DescribeMacro{\ReverseCommaActive}
%\DescribeMacro{\ReverseCommaInactive}
%\DescribeMacro{\RevComma}
-% The reversing macros \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}\ allow the easy generation of name lists ordered as \meta{SNN}, \meta{FNN} or \meta{SNN}, \meta{Alt. names}. 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:
+% The reversing macros \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}\ allow the easy generation of name lists ordered as \meta{SNN}, \meta{FNN} or \meta{SNN}, \meta{Alt. names}. The first two are broad toggles, while the third works on a per-name basis.
+% Both\marginpar{\small\raggedleft\cmd{\global}} \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} have the same local restrictions as the other state-changing macros unless you use \cmd{\global.}
+% 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}\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} & incompatible\\
-% {\large\strut}\Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & incompatible\\
-% {\large\strut}\Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\
+% \begin{quote}\small\setstretch{1.2}
+% \begin{tabular}{lll}\toprule
+% \Name*[J.S.]{Mill}[John Stuart] & \RevComma\Name*[J.S.]{Mill}[John Stuart] & OK\\
+% \Name*[Oskar]{Hammerstein, II} & \RevComma\Name*[Oskar]{Hammerstein, II} & OK\\
+% \Name*{John, Eriugena} & \RevComma\Name*{John, Eriugena} & incompatible\\
+% \Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & incompatible\\
+% \Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\\bottomrule
% \end{tabular}
% \end{quote}
% \NamesActive
%
-% {\hfill\large\bfseries Technical-Related Issues\hfill}\vspace{-2ex}
+% {\hfill\large\bfseries\emph{Technical-Related Issues}\hfill}\vspace{-2ex}
% \subsubsection{Fault Tolerance}
%
-% Especially since version 2.0, the \textsf{nameauth} package tries to prevent malformed input from creating side effects. For example, the malformed |\Name[Henry]{VIII}| no longer interferes with the well-formed |\Name{Henry}[VIII].| Furthermore, we guard against empty required values being passed to naming macros.
+% Especially since version 2.0, the \textsf{nameauth} package minimizes possible side effects of malformed input and macros that expand to being empty in required values. To reduce errors, \cmd{\Name}, \cmd{\FName}, \cmd{\AKA}, and \cmd{\IndexName} ignore leading and trailing spaces\,---\,but not medial spaces\,---\,making the following equivalent:
%
-% To reduce errors, \cmd{\Name}, \cmd{\FName}, \cmd{\AKA}, and \cmd{\IndexName} ignore leading and trailing spaces\,---\,but not medial spaces\,---\,making the following equivalent:
-%
-% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}
-% \begin{tabular}{ll}
-% \textit{Macro Example} & \textit{Resulting text}\\
+% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% \textit{Macro Example} & \textit{Resulting Text}\\\midrule
% |\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. }\\
+% |\Name*[Martin Luther]{ King, Jr. }| & \Name*[Martin Luther]{ King, Jr. }\\\bottomrule
% \end{tabular}
% \end{quote}
%
% \subsubsection{Detecting Punctuation}
%
-% 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:
+% In Western names, affixes like ``Jr.'' (junior), ``Sr.'' (senior), ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}) can colide with the full stop in a sentance. \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA} check for a trailing period in the name that they print in the text. If they find it, they check if the next token is a full stop and gobble it if so:
%
-% \begin{quote}\footnotesize\ForgetName[Martin Luther]{King, Jr.}
-% \begin{tabular}{r@{\hbox to 1em{\hfil}}c@{\hbox to 1em{\hfil}}l}
-% \textit{Macro Example} & \textit{periods} & \textit{Resulting text}\\
+% \begin{quote}\footnotesize\ForgetName[Martin Luther]{King, Jr.}\setstretch{1.2}
+% \begin{tabular}{r@{\hbox to 1em{\hfil}}c@{\hbox to 1em{\hfil}}l}\toprule
+% \textit{Macro Example\hfill} & \textit{periods} & \textit{Resulting Text}\\\midrule
% |\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 above.
+% |{\Name*[Martin Luther]{King, Jr.}}.| & $2\rightarrow2$ & {\Name*[Martin Luther]{King, Jr.}}.\footnotemark\\\bottomrule
+% \end{tabular}
+% \end{quote}
+% \footnotetext{Grouping tokens and other items can frustrate the full stop detection mechanism.}
%
% \subsubsection{Accented Names}
% \label{sec:accents}
%
-% For texts that contain accented characters, using \texttt{xelatex} or \texttt{lualatex} with \texttt{xindy} (\texttt{texindy}) is recommended. Since version 2.1, \textsf{nameauth} only requires special treatment of the leading character in the \meta{SNN} field when you use \cmd{\CapThis} under \texttt{pdflatex}. In that case use \cmd{\AccentCapThis} (Section~\ref{sec:standards}) if the character is not \texttt{a--z} or in the list below, for use with NFSS and the |utf8| input encoding:
-% \begin{quote}\small
-% \begin{tabular}{llll}
-% \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape first use \\
-% À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ & second use \\[1ex]
-% \scshape Ò Ó Ô Õ Ö Ø & \scshape Ù Ú Û Ü Ý & \scshape Þ ß & \scshape first use \\
-% Ò Ó Ô Õ Ö Ø & Ù Ú Û Ü Ý & Þ ß & second use \\[1ex]
-% \scshape à á â ã ä å æ & \scshape ç è é ê ë & \scshape ì í î ï ð ñ & \scshape first use \\
-% à á â ã ä å æ & ç è é ê ë & ì í î ï ð ñ & second use \\[1ex]
-% \scshape ò ó ô õ ö ø & \scshape ù ú û ü ý & \scshape þ ÿ & \scshape first use \\
-% ò ó ô õ ö ø & ù ú û ü ý & þ ÿ & second use \\[1ex]
-% \scshape Ă ă Ą ą Ć ć Č č & \scshape Ď ď Đ đ Ę ę Ě ě & \scshape Ğ ğ İ ı & \scshape first use \\
-% Ă ă Ą ą Ć ć Č č & Ď ď Đ đ Ę ę Ě ě & Ğ ğ İ ı & second use \\[1ex]
-% \scshape IJ ij Ľ ľ Ł ł & \scshape Ń ń Ň ň Œ œ & \scshape Ŕ ŕ Ř ř & \scshape first use \\
-% IJ ij Ľ ľ Ł ł & Ń ń Ň ň Œ œ & Ŕ ŕ Ř ř & second use \\[1ex]
-% \scshape Ś Ş ş Š š Ţ ţ Ť ť & \scshape Ů ů Ű ű & \scshape Ź ź Ż ż Ž ž & \scshape first use \\
-% Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž & second use \\
-% \end{tabular}
-% \end{quote}
-% These characters really act as control sequences, so you must use \cmd{\PretagName} (Section~\ref{sec:IndexSort}) to sort them properly.
+% For names that contain accented characters, using \texttt{xelatex} or \texttt{lualatex} with \texttt{xindy} (\texttt{texindy}) is recommended. Section~\ref{sec:engines} shows how you can work with multiple engines.
%
-% Examples |{æ}| and \cmd{\ae} always use argument |#1| if sent through the macro: |\def\foo#1#2#3\relax{<#1#2><#3>}.| With |\foo abc\relax| you always get <ab><c>. Both |\foo {æ}bc\relax| and |\foo \ae bc\relax| give <æb><c>.
+% If the leading character of \meta{SNN} is accented and lowercase (usually only in a particle), then you must use \cmd{\AccentCapThis} if you are using \texttt{pdflatex.} Sections~\ref{sec:standards} and~\ref{sec:Unicode} give more details about \cmd{\CapThis} and \cmd{\AccentCapThis}.
%
-% Using |æ| by itself gets tricky. In \texttt{xelatex} and \texttt{lualatex} this character always uses |#1| in |\foo æbc\relax| to get <æb><c>. Using \texttt{pdflatex} with NFSS causes problems; |\foo æbc\relax| gives <æ><bc>. With \textsf{inputenc} and \textsf{fontenc} |æ| by itself uses |#1#2|. It is ``two arguments wide.'' Any macro where this |#1#2| pair gets split into |#1| and |#2| will produce either the error \texttt{Unicode char \dots not set up for LaTeX} or the error \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}}. Using \cmd{\CapThis} can trigger this kind of error in \texttt{pdflatex.}
-%
-% Unicode characters and control sequences are not interchangeable. The example below shows this difference because the names are all long instead of long, then short (if they were the same):
+% Accented characters act like control sequences. In \texttt{pdflatex} use \cmd{\PretagName} with all names with extended Unicode characters (Sections~\ref{sec:IndexSort} and~\ref{sec:Unicode}).\footnote{This is true especially in NFSS while using \texttt{makeindex}. With \texttt{xindy} one can make custom sorting alphabets that are more powerful than \cmd{\PretagName}.}
+%
+% Nevertheless, Unicode characters and ``regular'' control sequences are not interchangeable. The example below shows this difference because the names are all long (thus, different). The names are not long, then short (were they the same):
% \begin{quote}
% \IndexInactive%
% |\Name[Johann]{Andre\"a}|\hfill \Name[Johann]{Andre\"a}\\
@@ -1341,55 +1374,8 @@ Running "make install" installs the files in the local TeX tree.
% |\Name{Æthelred, II}|\hfill \Name{Æthelred, II} instead of \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}). The following example lets you type, ``In Congreſs, July 4, 1776.''
-% \begin{quote}
-% |\usepackage{newunicodechar}|\\
-% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
-% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
-% |\newunicodechar{ſ}{\textlongs}|
-% \end{quote}
-%
-% Additionally, |\newunicodechar{ā}{\=a}| allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive. But be careful! 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}.
-%
-%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.
+% See Section~\ref{sec:Unicode} on how to add additional Unicode glyphs to the default set under NFSS, \textsf{inputenc}, and \textsf{fontenc}. 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:
-% \begin{quote}\small
-% |\usepackage{ifxetex}|\\
-% |\usepackage{ifluatex}|\\
-% |\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|\hfill |% also uses fontspec|\\
-% \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\
-% \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\
-% \hbox{\quad}|\else|\hfill |% traditional NFSS|\\
-% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
-% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
-% \hbox{\quad}|\fi|\\
-% |\fi|
-% \end{quote}
-%
-% The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:
-%
-% \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}|\ifpdf |\meta{pdflatex text}|%|\\
-% \hbox{\qquad}|\else |\meta{latex text}|%|\\
-% \hbox{\qquad}|\fi|\\
-% \hbox{\quad}|\fi|\\
-% |\fi|
-% \end{quote}
-%
% \subsubsection{Custom Formatting}
% \label{sec:formatting}
%
@@ -1398,13 +1384,14 @@ Running "make install" installs the files in the local TeX tree.
% \item \textbf{Syntactic Formatting:} This includes reversing names, capitalizing the first letter in the \meta{SNN} field in the body text, and capitalizing the root when \meta{SNN} is a \meta{root, suffix} pair.
% \item \textbf{Typographic Formatting:} This happens after a name has been parsed and reordered as needed into the final form it will take in the text.
% \end{enumerate}
-% Formatting\marginpar{\small\raggedleft Continental\\ small caps} does not affect the index. However, literal control sequences in the macro arguments of \cmd{\Name} and friends do make it into the index. Use this method with the \texttt{noformat} option to suppress default formatting. One also must use \cmd{\PretagName} to get proper index sorting:
+% Typographic formatting\marginpar{\small\raggedleft Continental\\ small caps} does not affect the index. However, literal control sequences in the macro arguments of \cmd{\Name} and friends do make it into the index. Use this method with the \texttt{noformat} option to suppress default formatting, which we simulate here. One also must use \cmd{\PretagName} to get proper index sorting:
% \NamesInactive
% \begin{quote}
% \indent|\PretagName[Greta]{\textsc{Garbo}}{Garbo, Greta}|\\
% \indent|\Name[Greta]{\textsc{Garbo}}|
% \end{quote}
-% You get \Name[Greta]{\textsc{Garbo}}, then \Name[Greta]{\textsc{Garbo}}. Even if it ``looks the same,'' the name |\Name[\normalfont{Greta}]{\textsc{Garbo}}| is a different name with a different index entry. In other words, avoid putting excess formatting into names, so that you gain both flexibility and consistency.
+% You get \Name[Greta]{\textsc{Garbo}}, then \Name[Greta]{\textsc{Garbo}}, even in the front matter because this formatting is persistent. Use |``Garbo''\IndexName\Name[Greta]{\textsc{Garbo}}| for a ``Garbo'' reference. |\Name[\normalfont{Greta}]{\textsc{Garbo}}| may look like the name above, but it is a different name with a different index entry. Keep the formatting simple to gain both flexibility and consistency.
+% \clearpage
%
% A comma delimiter will split the macro argument, potentially causing unbalanced braces. Avoid this by formatting the name and suffix separately:
% \begin{quote}\small
@@ -1416,8 +1403,8 @@ Running "make install" installs the files in the local TeX tree.
% | \< Howell & Thurston & \textsc{Howell},\textsc{III} & >|\\
% |\end{nameauth}|
% \end{quote}
-% \cmd{\Fukuyama} produces \Fukuyama\ and \Fukuyama. Of course, you could type all-capital surnames without control sequences. Likewise, \cmd{\Howell} generates \Howell\ and \Howell.
-% \NamesActive\bigskip
+%
+% \cmd{\Fukuyama} produces \Fukuyama\ and \Fukuyama. Of course, you could type all-capital surnames without control sequences. Likewise, \cmd{\Howell} generates \Howell\ and \Howell. We now revert to normal formatting.\NamesActive\medskip
%
% \DescribeMacro{\NameauthName}
% \DescribeMacro{\NameauthLName}
@@ -1425,22 +1412,20 @@ Running "make install" installs the files in the local TeX tree.
% These macros are set by default to \cmd{\@nameauth@Name}, the internal name parser. The main and simplified interfaces call them as respective synonyms for \cmd{\Name,} \cmd{\Name*,} and \cmd{\FName.} Should you desire to create your own naming macros, you can redefine them. Here is the minimal working example:
% \begin{quote}
% |\makeatletter|\\
-% |\newcommandx*\MyName[3][1=\@empty, 3=\@empty]%|\\
-% | {|\meta{Name here}|}%|\\
+% |\newcommandx*\MyName[3][1=\@empty, 3=\@empty]{|\meta{Name}|}%|\\
% |\newcommandx*\MyLName[3][1=\@empty, 3=\@empty]%|\\
-% | {|\meta{Long name here}|\@nameauth@FullNamefalse}%|\\
+% | {|\meta{Long name}|\@nameauth@FullNamefalse}%|\\
% |\newcommandx*\MyFName[3][1=\@empty, 3=\@empty]%|\\
-% | {|\meta{Short name here}|\@nameauth@FirstNamefalse}%|\\
+% | {|\meta{Short name}|\@nameauth@FirstNamefalse}%|\\
% |\makeatother|
% \end{quote}
-% \clearpage
%
% The macros above do not really work together with the rest of \textsf{nameauth} package, so be careful! You can hook these macros into the user interface thus:
% \begin{quote}
% \makeatletter%
-% \newcommandx*\MyName[3][1=\@empty, 3=\@empty]{\meta{Name here}}%
-% \newcommandx*\MyLName[3][1=\@empty, 3=\@empty]{\meta{Long name here}\@nameauth@FullNamefalse}%
-% \newcommandx*\MyFName[3][1=\@empty, 3=\@empty]{\meta{Short name here}\@nameauth@FirstNamefalse}%
+% \newcommandx*\MyName[3][1=\@empty, 3=\@empty]{\meta{Name}}%
+% \newcommandx*\MyLName[3][1=\@empty, 3=\@empty]{\meta{Long name}\@nameauth@FullNamefalse}%
+% \newcommandx*\MyFName[3][1=\@empty, 3=\@empty]{\meta{Short name}\@nameauth@FirstNamefalse}%
% \makeatother%
% |\renewcommand*{\NameauthName}{\MyName}|\\
% |\renewcommand*{\NameauthLName}{\MyLName}|\\
@@ -1457,37 +1442,26 @@ Running "make install" installs the files in the local TeX tree.
% \end{nameauth}
% This is \Silly, \LSilly, and \SSilly.
% \end{quote}
-% Like \cmd{\NamesFormat} below, the macros \cmd{\NameauthName,} \cmd{\NameauthLName,} and \cmd{\NameauthFName} respect scoping unless you use \cmd{\global.} Now \cmd{\Silly} and |\Name[No Particular]{Name}| produce \IndexInactive\Silly\ and \Name[No Particular]{Name}\IndexActive.\bigskip
+% Like\marginpar{\small\raggedleft\cmd{\global}} \cmd{\NamesFormat}, the other hook macros, and many of the state-changing and triggering macros in this package, these naming macros can be redefined or used locally within a scope without making global changes to the document unless you specifically use \cmd{\global}.
+%
+% Here we show that the macros \cmd{\NameauthName,} \cmd{\NameauthLName,} and \cmd{\NameauthFName} have reverted back to their original forms. Now \cmd{\Silly} and |\Name[No Particular]{Name}| produce \IndexInactive\Silly\ and \Name[No Particular]{Name}\IndexActive.\medskip
%
% \DescribeMacro{\NamesFormat}
-% 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 formatting in all footnotes:
+% 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. Originally it was the only formatting ``hook,'' but in version 2.4 and beyond it joins two similar ``hooks'' that are described in Section~\ref{sec:moreC}. One can redefine \cmd{\NamesFormat} to create custom effects like suppressing formatting in footnotes:
%
% \begin{quote}\small
% |\makeatletter|\\
% |\let\@oldfntext\@makefntext|\\
% |\long\def\@makefntext#1{%|\\
% | \renewcommand*\NamesFormat{}\@oldfntext{#1}}|\\
+% |\let\@makefntext\@oldfntext% just in case|\\
% |\makeatother|
% \end{quote}
+% \makeatletter\let\@oldfntext\@makefntext\long\def\@makefntext#1{\renewcommand*\NamesFormat{}\@oldfntext{#1}}\makeatother
+% Your footnote would produce an unformatted name.\footnote{This demonstrates no main-matter formatting: \Name[John Maynard]{Keynes}.}
+% We change footnotes back to normal with \makeatletter\let\@makefntext\@oldfntext\makeatother \cmd{\makeatletter}\cmd{\let}\cmd{\@makefntext}\cmd{\@oldfntext}\cmd{\makeatother.} Yet this example also can affect names in the body text, which may not be desirable. Section~\ref{sec:DisableFormat} has an arguably better approach.
%
-% \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 local scope of \cmd{\@makefntext}.
-%
-% A second example puts the mention of first names in boldface, with additional notations in the margin if possible:
-%\begin{quote}\small
-% |\let\oldformat\NamesFormat|\\
-% |\renewcommand*{\NamesFormat}[1]%|\\
-% | {\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}%
-% {\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}, 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}
-%
-% Outside of the |quote| environment above, we have \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}|. Do not mix these forms with each other or with the old syntax, lest errors bite! You would get multiple index entries, unwanted cross-references, and unexpected forms in the text. The simplified interface helps one to avoid this.
+% Relying only on scoping to insulate changes to \cmd{\NamesFormat} might create undesired side effects, depending on the sort of modification. We put longer examples of formatting and conditionals in Section~\ref{sec:moreC}.
%
% \subsubsection{Disable Formatting}
% \label{sec:DisableFormat}
@@ -1495,10 +1469,11 @@ Running "make install" installs the files in the local TeX tree.
% \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.
+%
+% Please\marginpar{\small\raggedleft\cmd{\global}} note that these two macros can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.
%
-% Here we switch to the ``front matter'' mode with \cmd{\NamesInactive}:
-% \NamesInactive
-% \begin{quote}\small
+% Here we switch to the ``front matter'' mode by placing \cmd{\NamesInactive} at the start of the \texttt{quote} environment:
+% \begin{quote}\small\NamesInactive
% \begin{tabular}{ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
@@ -1507,8 +1482,7 @@ Running "make install" installs the files in the local TeX tree.
% \end{tabular}
% \end{quote}
%
-% Then we switch back to ``main matter'' mode with \cmd{\NamesActive}:
-% \NamesActive
+% Then we switch back to ``main matter'' by leaving the scope above instead of calling \cmd{\NamesActive} explicitly. Avoid unwanted effects by using these toggling macros in pairs (perhaps with \cmd{\global}).
% \begin{quote}\small
% \begin{tabular}{ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
@@ -1526,14 +1500,17 @@ Running "make install" installs the files in the local TeX tree.
% | \NamesInactive\@oldfntext{#1}\NamesActive%|\\
% |}\makeatother|
% \end{quote}
+% \makeatletter\let\@oldfntext\@makefntext\long\def\@makefntext#1{\NamesInactive\@oldfntext{#1}\NamesActive}\makeatother
+% As above, your footnote would produce an unformatted name.\footnote{This demonstrates no front-matter formatting: \Name[John Maynard]{Keynes}.}
+% Here the ``non-formatted'' names would not affect the body text. Again we change footnotes back to normal with \makeatletter\let\@makefntext\@oldfntext\makeatother \cmd{\makeatletter}\cmd{\let}\cmd{\@makefntext}\cmd{\@oldfntext}\cmd{\makeatother.}
%
% \subsection{Name Decisions}
% \subsubsection{Testing Decisions}
% \label{sec:tests}
%
-% Sometimes the behavior of your document may need to change if a name is present or not. The macros in this subsection help to make such changes possible. Only \cmd{\Name,} \cmd{\Name*,} \cmd{\PName,} \cmd{\AKA,} \cmd{\AKA*,} \cmd{\ForgetName,} \cmd{\SubvertName,} and \cmd{\ExcludeName} affect the results of these macros.
+% The macros in this section permit conditional text that depends on the presence or absence of a name. The \cmd{\If} in this section's macro names is capitalized to be different from a regular |\if| expression. The branching of these macros is altered by using \cmd{\Name,} \cmd{\Name*,} \cmd{\FName,} \cmd{\PName,} \cmd{\AKA,} \cmd{\AKA*,} \cmd{\ForgetName,} \cmd{\SubvertName,} and \cmd{\ExcludeName.}
%
-% The following macros can be useful for generating conditional output in the document, such as inserting a ``short biography'' footnote or callout text after a name, depending on a particular context. Authors also can use them to generate ``reminders to self'' if a name has or has not occurred yet in the document. Such reminders could be linked with the \textsf{comment}, \textsf{pdfcomment}, and similar packages to aid writing and name management.\medskip
+% Some examples of conditional text include a ``mini-biography,'' a footnote, or a callout. These macros could be integrated with the ``text tag'' features in Section~\ref{sec:tagtext}. Authors and editors could use these macros with the \textsf{comment}, \textsf{pdfcomment}, and similar packages to make comments based on whether a name has occurred or not. That aids name management and thought development.
%
% \DescribeMacro{\IfMainName}
% If you want to produce output or perform a task based on whether a ``main body'' name exists, use \cmd{\IfMainName}, whose syntax is:
@@ -1541,15 +1518,13 @@ Running "make install" installs the files in the local TeX tree.
% \cmd{\IfMainName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{yes}\marg{no}
% \end{quote}
% This is a long macro via \cmd{\newcommandx}, so you can have paragraph breaks in the \meta{yes} and \meta{no} paths. A ``main body'' name is capable of being formatted by this package, \emph{i.e.}, one created by the naming macros when the \texttt{mainmatter} option is used or after \cmd{\NamesActive}. It is distinguished from those names that occur in the front matter and those that have been used as cross-references.
-% \clearpage
%
-% For example, we can test if we have yet to encounter the name ``Bob Hope'' in this document. We get ``\IfMainName[Bob]{Hope}{I met \Name[Bob]{Hope}}{I have not met \Name[Bob]{Hope}}'' from the following:
+% For example, we get ``\IfMainName[Bob]{Hope}{I met Bob Hope}{I have not met Bob Hope}'' from the following example because we have yet to invoke |\Name[Bob]{Hope}|:
% \begin{quote}
% |\IfMainName[Bob]{Hope}%|\\
-% |{I met \Name[Bob]{Hope}}%|\\
-% |{I have not met \Name[Bob]{Hope}}|
+% |{I met Bob Hope}%|\\
+% |{I have not met Bob Hope}|
% \end{quote}%
-% We will meet \FName[Bob]{Hope} in Section~\ref{sec:AKA}, so after this example we need to use the macro |\ForgetName[Bob]{Hope}| to ``forget'' that we saw this name.\ForgetName[Bob]{Hope}\medskip
%
% \DescribeMacro{\IfFrontName}
% If you want to produce output or perform a task based on whether a ``front matter'' name exists, use \cmd{\IfFrontName}, whose syntax is:
@@ -1558,7 +1533,14 @@ Running "make install" installs the files in the local TeX tree.
% \end{quote}
% This macro works the same as \cmd{\IfMainName.} A ``front matter'' name is not capable of being formatted by this package, \emph{i.e.}, one created by the naming macros when the \texttt{frontmatter} option is used or after \cmd{\NamesInactive}. It is distinguished from those names that occur in the main matter and those that have been used as cross-references.
%
-% For example, we can test whether a name has been used as a formatted name, an unformatted name, or both:
+% \label{page:Carnap}For example, based on Section~\ref{sec:DisableFormat}, we see that ``\ignorespaces
+% \IfFrontName[Rudolph]{Carnap}%
+% {\IfMainName[Rudolph]{Carnap}%
+% {\Name[Rudolph]{Carnap} is both}%
+% {\Name[Rudolph]{Carnap} is only non-formatted}}%
+% {\IfMainName[Rudolph]{Carnap}%
+% {\Name[Rudolph]{Carnap} is only formatted}%
+% {\Name[Rudolph]{Carnap} is not mentioned}}'' a formatted and unformatted name with the following test:
% \begin{quote}
% |\IfFrontName[Rudolph]{Carnap}%|\\
% |{\IfMainName[Rudolph]{Carnap}%|\\
@@ -1568,31 +1550,41 @@ Running "make install" installs the files in the local TeX tree.
% | {\Name[Rudolph]{Carnap} is only formatted}%|\\
% | {\Name[Rudolph]{Carnap} is not mentioned}}|
% \end{quote}%
-% From this we get the result that we expect from Section~\ref{sec:DisableFormat}, namely:
-% \IfFrontName[Rudolph]{Carnap}%
-% {\IfMainName[Rudolph]{Carnap}%
-% {\Name[Rudolph]{Carnap} is both}%
-% {\Name[Rudolph]{Carnap} is only non-formatted}}%
-% {\IfMainName[Rudolph]{Carnap}%
-% {\Name[Rudolph]{Carnap} is only formatted}%
-% {\Name[Rudolph]{Carnap} is not mentioned}}. We will return to this topic later.\medskip
+% We will return to this topic of main matter and front matter names later in Sections~\ref{sec:Tweaks} and~\ref{sec:LocalNames}. There we see how \cmd{\ForgetName} and \cmd{\SubvertName} usually affect both main- and front-matter names simultaneously unless set otherwise.\medskip
%
% \DescribeMacro{\IfAKA}
% If you want to produce output or perform a task based on whether a ``\emph{see}-reference'' name exists, use \cmd{\IfAKA}, whose syntax is:
% \begin{quote}
% \cmd{\IfAKA}\oarg{FNN}\marg{SNN}\oarg{Alt. names}\marg{y}\marg{n}\marg{excluded}
% \end{quote}
-% This macro works similarly to \cmd{\IfMainName,} although it has an ``excluded'' branch in order to detect those names excluded from indexing by \cmd{\ExcludeName} (Section~\ref{sec:exclude}). A ``\emph{see}-reference'' name is printed in the body text but only exists as a cross-reference created by \cmd{\AKA} and \cmd{\AKA*}. From the following example we get ``\IfAKA[Jay]{Rockefeller}{\LJRIV\ has an alias}{\LJRIV\ does not have an alias}{\LJRIV\ is excluded}'':
+% This macro works similarly to \cmd{\IfMainName,} although it has an additional \meta{excluded} branch in order to detect those names excluded from indexing by \cmd{\ExcludeName} (Section~\ref{sec:exclude}).
+%
+% A ``\emph{see}-reference'' name is printed in the body text but only exists as a cross-reference created by \cmd{\AKA} and \cmd{\AKA*}. First, in the text we see ``\AKA[John David]{Rockefeller, IV}[Jay]{Rockefeller},'' |\AKA[John David]{Rockefeller, IV}[Jay]{Rockefeller}|. Next, we have the following example:
% \begin{quote}
% |\IfAKA[Jay]{Rockefeller}%|\\
% | {\LJRIV\ has an alias}%|\\
-% | {\LJRIV\ does not have an alias}%|\\
+% | {\LJRIV\ has no alias}%|\\
% | {\LJRIV\ is excluded}|
% \end{quote}
-% If you are confident that you will not be dealing with names generated by \cmd{\ExcludeName} then you can just leave the \meta{excluded} branch as |{}.|
-% \clearpage
+% This gives us ``\IfAKA[Jay]{Rockefeller}{\LJRIV\ has an alias}{\LJRIV\ has no alias}{\LJRIV\ is excluded}.'' If you are confident that you will not be dealing with names generated by \cmd{\ExcludeName} then you can just leave the \meta{excluded} branch as |{}.|
%
-% A similar use of |\IfAKA{Confucius}| tells us that ``\IfAKA{Confucius}{\Name{Confucius} is an alias}{\Name{Confucius} is not an alias}{\Name{Confucius} is excluded}.'' Yet one might have to check further about \Name{Confucius} to see if it is used as a formatted name or a non-formatted name.
+% A similar use of |\IfAKA{Confucius}| tells us that ``\IfAKA{Confucius}{\Name{Confucius} is an alias}{\Name{Confucius} is not an alias}{}.'' Yet we should test that completely:
+% \begin{quote}
+% |\IfAKA[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
+% |{|\meta{true; it is a pseudonym}|}%|\\
+% |{%|\\
+% | \IfFrontName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
+% | {\IfMainName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
+% | {|\meta{both}|}%|\\
+% | {|\meta{front}|}%|\\
+% | }%|\\
+% | {\IfMainName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
+% | {|\meta{main}|}%|\\
+% | {|\meta{does not exist}|}%|\\
+% | }%|\\
+% |}%|\\
+% |{|\meta{excluded}|}|
+% \end{quote}
%
% Here we test for a name used with \cmd{\ExcludeName} (Section~\ref{sec:exclude}) to get the result, ``\ExcludeName{Grinch}\IfAKA{Grinch}{\Name{Grinch} is an alias}{\Name{Grinch} is not an alias}{\Name{Grinch} is excluded}'':
% \begin{quote}
@@ -1606,74 +1598,65 @@ Running "make install" installs the files in the local TeX tree.
% \subsubsection{Changing Decisions}
% \label{sec:Tweaks}
%
-% This section describes macros that change the status of whether a name has occurred. That also helps to avoid clashes between formatted and non-formatted names. They are meant for editing at or near the final draft stage. ``\emph{See}-reference'' names created by \cmd{\AKA} are not affected by these macros.\bigskip
+% This section describes macros that change the status of whether a name has occurred. That also helps to avoid clashes between formatted and non-formatted names. They are meant for editing at or near the final draft stage. ``\emph{See}-reference'' names created by \cmd{\AKA} are not affected by these macros.\medskip
%
% \DescribeMacro{\ForgetName}
% This macro is a ``dirty trick'' of sorts that takes the same optional and mandatory arguments used by \cmd{\Name}. It handles its arguments in the same way, except that it ignores the final argument if \meta{FNN} are present. The syntax is:
% \begin{quote}
% \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
-% This macro causes \cmd{\Name} and friends globally 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.\bigskip
+% This macro causes \cmd{\Name} and friends globally 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.
%
% \DescribeMacro{\SubvertName}
% This macro is the opposite of the one above. It takes the same arguments. It handles its arguments in the same manner. The syntax is:
% \begin{quote}
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
-% This macro causes \cmd{\Name} and friends globally 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.\bigskip
+% This macro causes \cmd{\Name} and friends globally 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.
%
-% The default \marginpar{\small\raggedleft Scope} behavior of these two macros changes whether a name is ``forgotten'' or ``subverted'' simultaneously for front matter and main matter names, Remember the example above that gave us the answer, ``\IfFrontName[Rudolph]{Carnap}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is both}{\Name[Rudolph]{Carnap} is only non-formatted}}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is only formatted}{\Name[Rudolph]{Carnap} is not mentioned}}'':
-% \begin{quote}
-% |\IfFrontName[Rudolph]{Carnap}%|\\
-% |{\IfMainName[Rudolph]{Carnap}%|\\
-% | {\Name[Rudolph]{Carnap} is both}%|\\
-% | {\Name[Rudolph]{Carnap} is only non-formatted}}%|\\
-% |{\IfMainName[Rudolph]{Carnap}%|\\
-% | {\Name[Rudolph]{Carnap} is only formatted}%|\\
-% | {\Name[Rudolph]{Carnap} is not mentioned}}|
-% \end{quote}
-%
-% Now watch closely: After we use \ForgetName[Rudolph]{Carnap}|\ForgetName[Rudolph]{Carnap}| we get the result,
+% The default \marginpar{\small\raggedleft Scope} behavior of these two macros changes whether a name is ``forgotten'' or ``subverted'' simultaneously for front matter and main matter names, Remember the example on page~\pageref{page:Carnap} above that gave us the answer, ``\IfFrontName[Rudolph]{Carnap}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is both}{\Name[Rudolph]{Carnap} is only non-formatted}}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is only formatted}{\Name[Rudolph]{Carnap} is not mentioned}}?'' Now watch closely: After we use \ForgetName[Rudolph]{Carnap}|\ForgetName[Rudolph]{Carnap}| we get the result,
% ``\IfFrontName[Rudolph]{Carnap}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is both}{\Name[Rudolph]{Carnap} is only non-formatted}}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is only formatted}{\Name[Rudolph]{Carnap} is not mentioned}}.'' Both the main matter name and the front matter name were forgotten!
%
% This default behavior helps synchronize formatted and unformatted types of names. For example, if you wanted to use unformatted names in the footnotes and formatted names in the text (Section~\ref{sec:DisableFormat}), you could use, \emph{e.g.} \cmd{\SubvertName} right after the first use of a name in the body text, ensuring that all references in the text and notes would be short unless otherwise modified.\footnote{This manual takes advantage of that behavior at times in order to synchronize first and subsequent uses of names between formatted and unformatted sections of the body text.}
%
% \DescribeMacro{\LocalNames}
% \DescribeMacro{\GlobalNames}
-% If, however, this ``global'' behavior of \cmd{\ForgetName} and \cmd{\SubvertName} is not desired, you can use \cmd{\LocalNames} to change that behavior and \cmd{\GlobalNames} to restore the default behavior. Both of these macros are global in scope.
+% If, however, this ``global'' behavior of \cmd{\ForgetName} and \cmd{\SubvertName} is not desired, you can use \cmd{\LocalNames} to change that behavior and \cmd{\GlobalNames} to restore the default behavior. Both of these macros work globally.
%
-% After \cmd{\LocalNames,} if you are in a ``front matter'' section via the \texttt{frontmatter} option or \cmd{\NamesInactive,} \cmd{\ForgetName} and \cmd{\SubvertName} will only affect unformatted names. If you are in a ``main matter'' section via the \texttt{mainmatter} option or \cmd{\NamesActive,} then \cmd{\ForgetName} and \cmd{\SubvertName} will only affect formatted names. The following example helps to illustrate local changes:
-% \begin{quote}\small
-% |\def\CheckChuck{%\IfFrontName[Charlie]{Chaplin}%|\\
-% | {\IfMainName[Charlie]{Chaplin}{both}{front}}%|\\
-% | {\IfMainName[Charlie]{Chaplin}{main}{none}}}%|\\[2ex]
-% \def\CheckChuck{\IfFrontName[Charlie]{Chaplin}%
-% {\IfMainName[Charlie]{Chaplin}{both}{front}}%
-% {\IfMainName[Charlie]{Chaplin}{main}{none}}}%
-% We begin by creating a formatted name in the main matter:\\
-% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
-% Now we switch to an unformatted section and create a name there:\\
-% |\NamesInactive|\NamesInactive\\
-% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
-% We now have two names. They look and behave the same, but are two different ``species'' with independent first and subsequent uses. We set the scope of \cmd{\ForgetName} and \cmd{\SubvertName} to local, then forget the name in the unformatted section:\\
-% |\LocalNames|\LocalNames\\
-% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
-% We ``subvert'' the name control sequence in the unformatted section, as if the name has occurred, and switch back to the main section:
-% |\SubvertName[Charlie]{Chaplin}|\SubvertName[Charlie]{Chaplin}\\
-% |\NamesActive|\NamesActive\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
-% We forget the formatted name and reset the default behavior:\\
-% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
-% |\GlobalNames|\GlobalNames\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
-% Finally, we forget everything:\\
-% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
-% |\CheckChuck|\hfill\CheckChuck\\[2ex]
+% After \cmd{\LocalNames,} if you are in a ``front matter'' section via the \texttt{frontmatter} option or \cmd{\NamesInactive,} \cmd{\ForgetName} and \cmd{\SubvertName} will only affect unformatted names. If you are in a ``main matter'' section via the \texttt{mainmatter} option or \cmd{\NamesActive,} then \cmd{\ForgetName} and \cmd{\SubvertName} will only affect formatted names. Section~\ref{sec:LocalNames} offers a long example.
+%
+% \subsection{``Text Tags''}
+% \label{sec:tagtext}
+%
+% Sections~\ref{sec:TagName} and~\ref{sec:UntagName} deal with similar tagging features in the index. ``Text tags'' differ from index tags because they are not printed automatically with every name managed by \textsf{nameauth}. Section~\ref{sec:moreC} offers additional solutions that use the macros in this section.
+%
+% Instead of ``text tags,'' perhaps one should think about ``name information database entries.'' The macros in this section are named accordingly. We retain the ``text tag'' language for simplicity.
+%
+% \DescribeMacro{\NameAddInfo}
+% Text tags are independent of any other name conditionals, similar to index tags. This \cmd{\long} macro's syntax is:
+% \begin{quote}
+% \cmd{\NameAddInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
+% \end{quote}
+%
+% For example, |\NameAddInfo[George]{Washington}{ (1732--99)}|\NameAddInfo[George]{Washington}{ (1732--99)} will associate the text \texttt{\textvisiblespace(1732--99)} with the name \cmd{\LWash} \LWash. Note, however, that the tag did not print automatically with the name.
+%
+% \DescribeMacro{\NameQueryInfo}
+% To retrieve the information in a text tag, one uses the name as a key to the corresponding information:
+% \begin{quote}
+% \cmd{\NameQueryInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
+% \end{quote}
+% Thus, |``\NameQueryInfo[George]{Washington}.''| expands to ``\NameQueryInfo[George]{Washington}.'' Notice the space at the beginning of the tag. This is intentional, as with index tags. Sections~\ref{sec:TagName}, \ref{sec:UntagName}, and~\ref{sec:moreC} illustrate how this can permit tags like asterisks, daggers, and footnotes in addition to tags that do need a space or some separation between them and the name.
+%
+% By using these text tag macros with the conditional macros, one can display information associated with a name based on whether or the name has occurred. As of version 2.4, this can be done either outside of \cmd{\NamesFormat} and the other general hooks or inside those macros.
+%
+% \DescribeMacro{\NameClearInfo}
+% \cmd{\NameAddInfo} will replace one text tag with another text tag, but it does not delete a text tag. That is the role of \cmd{\NameClearInfo}. The syntax is:
+% \begin{quote}
+% \cmd{\NameClearInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
+% For example, |\NameClearInfo[George]{Washington}|\NameClearInfo[George]{Washington} will cause the macro |``\NameQueryInfo[George]{Washington}''| to produce nothing: ``\NameQueryInfo[George]{Washington}''
+%
% \subsection{Name Variant Macros}
% \subsubsection{\texttt{\textbackslash AKA}}
% \label{sec:AKA}
@@ -1685,8 +1668,7 @@ Running "make install" installs the files in the local TeX tree.
% \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.
+% 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. Please consult also Section~\ref{sec:AKAtips}, which covers a number of in-depth examples of \cmd{\AKA.}
%
% 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, similar to the naming macros.
%
@@ -1698,73 +1680,52 @@ Running "make install" installs the files in the local TeX tree.
%
% \Name{Jean, sans Peur} (\AKA{Jean, sans Peur}{Jean the Fearless}) was Duke of Burgundy 1404--1419.
% \end{quote}
-% ``Jean the Fearless'' intentionally receives no formatting because I intend that only names with main index entries be formatted. One could put \cmd{\AKA} within a formatting macro to make that otherwise. Still, the reversing and capitalizing mechanisms do work with \cmd{\AKA}.
%
-% This complex example shows the Continental style with no default formatting:
-% \begin{quote}\small
+% ``\AKA{Jean, sans Peur}{Jean the Fearless}'' receives no formatting; this package usually formats only names with main index entries. Section~\ref{sec:moreC} discusses how one might address that beyond the \texttt{alwaysformat} option. The syntactic aspects of name formatting (caps and reversing) always work with \cmd{\AKA}.
+%
+% The following complex example has lines of source literals interleaved with a point-by-point enumerated list, showing the Continental style. The small caps are a syntactic element of the name parameters themselves:
+% \begin{enumerate}\let\oldformat\NamesFormat\renewcommand\NamesFormat{}
+% \item I tag the names for proper sorting.\\[4pt]
% |\PretagName[Heinz]{\textsc{Rühmann}}{Ruehmann, Heinz}%|\\
% |\PretagName[Heinrich Wilhelm]{\textsc{Rühmann}}%|\\
-% | {Ruehmann, Heinrich Wilhelm}%|\\
-% |\SubvertName[Heinz]{\textsc{Rühmann}}%|\\
+% | {Ruehmann, Heinrich Wilhelm}%|
+% \item I want ``\Name*[Heinz]{\textsc{Rühmann}}'' to be the main name of reference, so \cmd{\AKA*} uses his legal name as the cross-reference. \cmd{\AKA*} prints only ``Heinrich Wilhelm'' in the body text. Nevertheless, the index cross-reference will be complete with the surname.\\[4pt]
% |\AKA*[Heinz]{\textsc{Rühmann}}%|\\
-% | [Heinrich Wilhelm]{\textsc{Rühmann}} %|\\
-% |``\FName[Heinz]{\textsc{Rühmann}}'' %|\\
-% |\Name[Heinz]{\textsc{Rühmann}} %|\\
-% \texttt{(7 March 1902|-||-|3 October 1994) was a German film actor who\break appeared in over 100 films between 1926 and 1993.}\\[1ex]
-% \NamesInactive
-% \SubvertName[Heinz]{\textsc{Rühmann}}%
-% \AKA*[Heinz]{\textsc{Rühmann}}%
-% [Heinrich Wilhelm]{\textsc{Rühmann}} %
-% ``\FName[Heinz]{\textsc{Rühmann}}'' %
-% \Name[Heinz]{\textsc{Rühmann}} %
-% (7 March 1902--3 October 1994) was a German film actor who appeared in over 100 films between 1926 and 1993.
-% \NamesActive
+% | [Heinrich Wilhelm]{\textsc{Rühmann}} %|
+% \item \cmd{\SubvertName} causes \cmd{\FName} to print the short version. It also bypasses the default name formatting.\\[4pt]
+% |\SubvertName[Heinz]{\textsc{Rühmann}}%|
+% \item \cmd{\FName} prints ``\FName[Heinz]{\textsc{Rühmann}}.''\\[4pt]
+% |``\FName[Heinz]{\textsc{Rühmann}}'' %|
+% \item \cmd{\Name} prints ``\Name[Heinz]{\textsc{Rühmann}}.'' The small caps are syntactic, not typographic, because they are part of the argument to \cmd{\Name} itself.\\[4pt]
+% |\Name[Heinz]{\textsc{Rühmann}} %|\let\NamesFormat\oldformat
+% \end{enumerate}
+% The resulting text is:
+% \begin{quote}
+% \AKA*[Heinz]{\textsc{Rühmann}}[Heinrich Wilhelm]{\textsc{Rühmann}}
+% \SubvertName[Heinz]{\textsc{Rühmann}}``\FName[Heinz]{\textsc{Rühmann}}''
+% \Name[Heinz]{\textsc{Rühmann}} (7 March 1902--3 October 1994) was a German film actor who appeared in over 100 films between 1926 and 1993.
% \end{quote}
-% First I want ``\Name*[Heinz]{\textsc{Rühmann}}'' to be the main name of reference, so \cmd{\SubvertName} causes \cmd{\FName} to print the short version.
-% Second, I use \cmd{\AKA*} to print only the forenames ``Heinrich Wilhelm'' in the body text. Nevertheless, the index cross-reference will be complete.
-% Third, \cmd{\FName} prints ``\FName[Heinz]{\textsc{Rühmann}}.'' Finally, \cmd{\Name} prints \Name[Heinz]{\textsc{Rühmann}}. Of course I used \cmd{\PretagName} to sort the index entries.
% \clearpage
%
% Using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, \Name{Lao-tzu}, and \Name{Gregory, I} as examples, we see how \cmd{\AKA} and \cmd{\AKA*} work:
%
-% \begin{quote}\small
-% \begin{tabular}{ll}\hline
-% {\large\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
-% {\large\strut}|\AKA*[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}\\
-% {\large\strut}|\AKA[Bob]{Hope}%|\\| [Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\
-% {\large\strut}|\AKA*[Bob]{Hope}%|\\| [Leslie Townes]{Hope}[Lester T.]| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\\hline
-% {\large\strut}|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
-% {\large\strut}|\AKA*{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
-% {\large\strut}|\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\
-% {\large\strut}|\AKA*{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\\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]\\\hline
+% \begin{quote}\small\setstretch{1.2}
+% \begin{tabular}{ll}\toprule
+% |\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
+% |\AKA*[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}\\
+% |\AKA[Bob]{Hope}%|\\| [Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\
+% |\AKA*[Bob]{Hope}%|\\| [Leslie Townes]{Hope}[Lester T.]| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\\midrule
+% |\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
+% |\AKA*{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
+% |\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\
+% |\AKA*{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\\midrule
+% |\AKA{Gregory, I}{Gregory}[the Great]| & \AKA{Gregory, I}{Gregory}[the Great]\\
+% |\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\\bottomrule
% \end{tabular}
% \end{quote}
-% The alternate form ``Lester T. Hope'' does not appear in the index, but only in the body text to allow for variations. \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' happens with\\[1ex]
-% \indent\quad|\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''|\\[1ex]
-% The index has a \emph{see} reference from ``Gregory the Great'' to ``Gregory I.'' Some helpful tips for \cmd{\AKA} and \cmd{\AKA*} follow:
-% \begin{itemize}\small
-% \item \oarg{FNN}\marg{SNN} is the main name. \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} is the cross-reference. Forgetting this may cause errors.
-% \item The old syntax causes \cmd{\AKA} and \cmd{\AKA*} to fail: |\AKA{Louis}[XIV]{Sun King}| and |\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 as pseudonyms, with all that entails. One can refer to \Name[Lafcadio]{Hearn} as \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}:\\\hbox{}\qquad|\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.},\\\hbox{}\qquad \cmd{\RevComma}: \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}\\\hbox{}\qquad \cmd{\RevName}: \RevName\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}
-% \item The name fields of \cmd{\PretagName} correspond with the \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} fields of \cmd{\AKA}:\\[1ex]\hbox{}\qquad |\AKA{Vlad| |III,| |Dracula}{Vlad,| |Ţepeş}| matches\\\hbox{}\qquad |\PretagName{Vlad,| |Ţepeş}{Vlad| |Tepes}|\\[1ex] This form does not match: |\PretagName{Vlad}[Ţepeş]{Vlad| |Tepes}|.
-% \item With stage names like \Name[The Amazing]{Kreskin}, if you want them in the index, use |\Name[The Amazing]{Kreskin}| to get ``Kreskin, The Amazing.'' \IndexInactive Otherwise use something like |\Name[J.]{Kreskin}[The Amazing]| to get \Name[J.]{Kreskin}[The Amazing] in the text and ``Kreskin, J.'' in the index.\\[1ex] Using \cmd{\AKA} with such names looks like: |\AKA[The Amazing]{Kreskin}| |[Joseph]{Kresge}| and |\AKA[J.]{Kreskin}[Joseph]{Kresge}|.\IndexActive You get \Name*[The Amazing]{Kreskin}, a.k.a. \AKA[The Amazing]{Kreskin}[Joseph]{Kresge}.
-% \item Special cases like ``Iron Mike'' Tyson as the nickname for \Name[Mike]{Tyson} may be handled in a number of ways.
-% \begin{enumerate}\small
-% \item Follow |``Iron Mike''| with |\IndexName[Mike]{Tyson}| and do whatever you want in the text. This may be the easiest solution.
-% \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}. This is the best solution in terms of how \textsf{nameauth} is designed.
-% \item Always get ``Iron Mike Tyson'' with something like:\\[1ex]
-% |\newcommand*{\Iron}{\SubvertName[Mike]{Tyson}%|\\
-% |\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}|\\[1ex]
-% \newcommand*{\Iron}{\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}
-% |``\Iron''| gives you ``\Iron.''\footnote{In typesetting this manual I defined the macro \cmd{\Iron} and others like it on one continuous line because defining a macro over multiple lines with comment characters ending them in \textsf{ltxdoc} and a \texttt{.dtx} file caused extra spaces to be inserted.} You are responsible for typesetting the first use and creating a cross-reference. This solution runs somewhat contrary to the design principles of \textsf{nameauth}, but it may be helpful if you want the invariant name ``\Iron'' to recur and you want to save typing.
-% \end{enumerate}
-% \end{itemize}
+%
+% The alternate form ``Lester T. Hope'' in the previous table does not appear in the index, but only in the body text. A possible use here could involve ``spurious'' information or opinions that one might want to mention in the text but not the index. One produces \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great],'' along with a \emph{see} reference from ``Gregory the Great'' to ``Gregory I,'' via:\\[1ex]
+% \indent\quad|\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''|\medskip
%
% \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}
@@ -1782,29 +1743,24 @@ Running "make install" installs the files in the local TeX tree.
% \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}
-% \clearpage
%
% Using \cmd{\PretagName} helps avoid the need for manual index entries. Instead of doing a lot of extra work for some names, consider the following example:
%
-% \begin{quote}
+% \begin{quote}\small
% {\ttfamily%
-% |\PretagName{\textit{Doctor Angelicus}}%|\\
-% | {Doctor Angelicus}%|\\
-% |Perhaps the greatest medieval theologian was|\\
-% |\Name{Thomas, Aquinas}|\\
-% |(\AKA{Thomas, Aquinas}{Thomas of Aquino})|,\\
-% also known as\\
+% |\PretagName{\textit{Doctor| |Angelicus}}{Doctor| |Angelicus}|\\
+% |Perhaps| |the| |greatest| |medieval| |theologian was %|\\
+% |\Name{Thomas,| |Aquinas} %|\\
+% |(\AKA{Thomas,| |Aquinas}{Thomas| |of| |Aquino}), also known as %|\\
% |\AKA{Thomas, Aquinas}{\textit{Doctor Angelicus}}|.}
%
-% \PretagName{\textit{Doctor Angelicus}}%
-% {Doctor Angelicus}%
+% \PretagName{\textit{Doctor Angelicus}}{Doctor Angelicus}
% Perhaps the greatest medieval theologian was
-% \Name{Thomas, Aquinas}
-% (\AKA{Thomas, Aquinas}{Thomas of Aquino}),
-% also known as
+% \Name{Thomas, Aquinas} %
+% (\AKA{Thomas, Aquinas}{Thomas of Aquino}), also known as %
% \AKA{Thomas, Aquinas}{\textit{Doctor Angelicus}}.
% \end{quote}
-% We use the medieval form: |\Name{Thomas, Aquinas}| because ``Aquinas'' is not a surname. Section~\ref{sec:standards} talks about those unfortunate situations where one must use the Western form |\Name[Thomas]{Aquinas}.|
+% We use the medieval form: |\Name{Thomas, Aquinas}| because ``Aquinas'' is not a surname, even though many people, including scholars, falsely use it as such. Section~\ref{sec:standards} talks about those unfortunate situations where one must use the Western form |\Name[Thomas]{Aquinas}.|
%
% \subsubsection{\texttt{\textbackslash PName}}
%
@@ -1818,13 +1774,19 @@ Running "make install" installs the files in the local TeX tree.
%
% The main name comes first, followed by the name that is only a \emph{see} reference. \cmd{\PName} can generate the following examples:
%
-% \begin{quote}\small
-% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\[1ex]
-% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\[1ex]
-% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\[2ex]
-% |\PName{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}\\[1ex]
-% |\PName*{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName*{Voltaire}[François-Marie]{Arouet}\\[1ex]
-% |\PName{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}
+% \begin{quote}\small\setstretch{1.1}
+% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\
+% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}|\\
+% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\[1ex]
+% \hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
+% \hbox{}\hfill \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\
+% \hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\[1ex]
+% |\PName{Voltaire}[François-Marie]{Arouet}|\\
+% |\PName*{Voltaire}[François-Marie]{Arouet}|\\
+% |\PName{Voltaire}[François-Marie]{Arouet}|\\[1ex]
+% \hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}\\
+% \hbox{}\hfill \PName*{Voltaire}[François-Marie]{Arouet}\\
+% \hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}
% \end{quote}
%
% \cmd{\PName} can be a bit sketchy with medieval names. You get \PName{William, I}{William, the Conqueror} with |\PName{William,| |I}{William,| |the Conqueror}.| Stay away from |\PName{William, I}{William}[the Conqueror]| because that is the old syntax that can break both \cmd{\AKA} and \cmd{\PName} if used in the leading arguments instead of in the trailing arguments. The old syntax can get you confused and lead you to type |\PName{William, I}[William]{the Conqueror}.| You would get a name that looked right in the body text but wrong in the index.
@@ -1838,7 +1800,9 @@ Running "make install" installs the files in the local TeX tree.
%
% \DescribeMacro{\IndexActive}
% \DescribeMacro{\IndexInactive}
-% 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.\medskip
+% 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.
+%
+% Please\marginpar{\small\raggedleft\cmd{\global}} note that these two macros can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.\medskip
%
% \noindent\textbf{You cannot use index tags if the \textsf{nameauth} indexing feature is inactive.}
%
@@ -1846,12 +1810,9 @@ Running "make install" installs the files in the local TeX tree.
% \label{sec:babel}
% Using\marginpar{\small\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} redefines \cmd{\textlatin} to produce the page number itself within a certain scope like:
-% \begin{quote}
-% |\newcommand{\fixindex}[1]{\def\textlatin##1{##1}#1}|
-% \end{quote}
-% This solution has proven quite effective for me. One need only type
+% One fairly effective workaround for \texttt{texindy} redefines \cmd{\textlatin} to produce the page number itself within a certain scope like:
% \begin{quote}
+% |\newcommand{\fixindex}[1]{\def\textlatin##1{##1}#1}|\\\dots\\
% |\fixindex{%|\\
% \meta{paragraphs of running text}|%|\\
% |}|
@@ -1920,9 +1881,8 @@ Running "make install" installs the files in the local TeX tree.
% \end{tabular}\medskip
%
% All the tagging commands use the name arguments as a reference point. \cmd{\PretagName} generates the leading sort key while \cmd{\TagName} and \cmd{\UntagName} affect the trailing content of the index entry.
-% \clearpage
%
-% 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:
+% Tags created by \cmd{\TagName} can be helpful in the indexes of history texts, as can other package features. 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}:
% \begin{quote}\small
% \begin{tabular}{p{0.5\textwidth}p{0.28\textwidth}}
% |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & (in the preamble)\\
@@ -1935,15 +1895,14 @@ Running "make install" installs the files in the local TeX tree.
% \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.
+% Tags are literal text that can be daggers, asterisks, and even specials. For example, all fictional names in the index of this manual are tagged with an asterisk. One must add any desired spacing to 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.}.
%
% 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}}
+% \label{sec:UntagName}
%
% \DescribeMacro{\UntagName}
% \cmd{\TagName} will replace one tag with another tag, but it does not remove a tag from a name. That is the role of \cmd{\UntagName}. The syntax is:
@@ -1978,24 +1937,516 @@ Running "make install" installs the files in the local TeX tree.
% \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
-% You will see excluded names printed in the body text with all the formatting and other features:
+% Consider the following example, where you will see excluded names printed in the body text with all the formatting and other features:
% \begin{quote}
% |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle}\\
% |\Name[Kris]{Kringle}| and |\Name[Kris]{Kringle}|:\\
% \Name[Kris]{Kringle} and \Name[Kris]{Kringle}.
% \end{quote}
+%
% Nevertheless, no matter how many times you use \Name[Kris]{Kringle} in the body text, the name will never appear in the index. Remember the \Name{Grinch} from Section~\ref{sec:tests}? He will not appear in the index either.
%
% \cmd{\ExcludeName} also prevents cross-references. You may see output in the body text, but no \emph{see}-reference will appear in the index:
% \begin{quote}
% |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus}\\
-% |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus}
+% |\AKA[Kris]{Kringle}[Santa]{Claus}|\\ \AKA[Kris]{Kringle}[Santa]{Claus}
% \end{quote}
%
% Instead of using \cmd{\ExcludeName}, which basically prevents the indexing mechanism of the naming macros from doing anything with a particular name, it is far likelier that you would use the index control macros (Section~\ref{sec:SectionIndex}).
% \clearpage
%
-% \subsection{Variant Spellings}
+% \subsection{Longer Examples}
+%
+% \subsubsection{Tips for \texttt{\textbackslash AKA}}
+% \label{sec:AKAtips}
+%
+% \begin{itemize}\small
+% \item \oarg{FNN}\marg{SNN} is the main name. \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} is the cross-reference. Forgetting this may cause errors.
+% \item The old syntax causes \cmd{\AKA} and \cmd{\AKA*} to fail: |\AKA{Louis}[XIV]{Sun King}| and |\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 as pseudonyms, with all that entails. One can refer to \Name[Lafcadio]{Hearn} as \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}:\\\hbox{}\qquad|\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.},\\\hbox{}\qquad \cmd{\RevComma}: \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}\\\hbox{}\qquad \cmd{\RevName}: \RevName\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}
+% \item The name fields of \cmd{\PretagName} correspond with the \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} fields of \cmd{\AKA}:\\[1ex]\hbox{}\qquad |\AKA{Vlad| |III,| |Dracula}{Vlad,| |Ţepeş}| matches\\\hbox{}\qquad |\PretagName{Vlad,| |Ţepeş}{Vlad| |Tepes}|\\[1ex] This form does not match: |\PretagName{Vlad}[Ţepeş]{Vlad| |Tepes}|.
+% \item With stage names like \Name[The Amazing]{Kreskin}, if you want them in the index, use |\Name[The Amazing]{Kreskin}| to get ``Kreskin, The Amazing.'' \IndexInactive Otherwise use something like |\Name[J.]{Kreskin}[The Amazing]| to get \Name[J.]{Kreskin}[The Amazing] in the text and ``Kreskin, J.'' in the index.\\[1ex] Using \cmd{\AKA} with such names looks like: |\AKA[The Amazing]{Kreskin}| |[Joseph]{Kresge}| and |\AKA[J.]{Kreskin}[Joseph]{Kresge}|.\IndexActive You get \Name*[The Amazing]{Kreskin}, a.k.a. \AKA[The Amazing]{Kreskin}[Joseph]{Kresge}.
+% \item Special cases like ``Iron Mike'' Tyson as the nickname for \Name[Mike]{Tyson} may be handled in a number of ways.
+% \begin{enumerate}\small
+% \item Follow |``Iron Mike''| with |\IndexName[Mike]{Tyson}| and do whatever you want in the text. This may be the easiest solution.
+% \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}. This is the best solution in terms of how \textsf{nameauth} is designed.
+% \item Always get ``Iron Mike Tyson'' with something like:\\[1ex]
+% |\newcommand*{\Iron}{\SubvertName[Mike]{Tyson}%|\\
+% |\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}|\\[1ex]
+% \newcommand*{\Iron}{\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}
+% |``\Iron''| gives you ``\Iron.''\footnote{In typesetting this manual I defined the macro \cmd{\Iron} and others like it on one continuous line because defining a macro over multiple lines with comment characters ending them in \textsf{ltxdoc} and a \texttt{.dtx} file caused extra spaces to be inserted.} You are responsible for typesetting the first use and creating a cross-reference. This solution runs somewhat contrary to the design principles of \textsf{nameauth}, but it may be helpful if you want the invariant name ``\Iron'' to recur and you want to save typing.
+% \end{enumerate}
+% \end{itemize}
+%
+% \subsubsection{Unicode and NFSS}
+% \label{sec:Unicode}
+%
+% The following subset of extended Latin Unicode characters are available ``out of the box'' using NFSS, \textsf{inputenc}, and \textsf{fontenc}:
+%
+% \begin{quote}\small\setstretch{1.2}
+% \begin{tabular}{llll}\toprule
+% \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape small caps \\
+% À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ & normal \\[1ex]
+% \scshape Ò Ó Ô Õ Ö Ø & \scshape Ù Ú Û Ü Ý & \scshape Þ ß & \scshape small caps \\
+% Ò Ó Ô Õ Ö Ø & Ù Ú Û Ü Ý & Þ ß & normal \\[1ex]
+% \scshape à á â ã ä å æ & \scshape ç è é ê ë & \scshape ì í î ï ð ñ & \scshape small caps \\
+% à á â ã ä å æ & ç è é ê ë & ì í î ï ð ñ & normal \\[1ex]
+% \scshape ò ó ô õ ö ø & \scshape ù ú û ü ý & \scshape þ ÿ & \scshape small caps \\
+% ò ó ô õ ö ø & ù ú û ü ý & þ ÿ & normal \\[1ex]
+% \scshape Ă ă Ą ą Ć ć Č č & \scshape Ď ď Đ đ Ę ę Ě ě & \scshape Ğ ğ İ ı & \scshape small caps \\
+% Ă ă Ą ą Ć ć Č č & Ď ď Đ đ Ę ę Ě ě & Ğ ğ İ ı & normal \\[1ex]
+% \scshape IJ ij Ľ ľ Ł ł & \scshape Ń ń Ň ň Œ œ & \scshape Ŕ ŕ Ř ř & \scshape small caps \\
+% IJ ij Ľ ľ Ł ł & Ń ń Ň ň Œ œ & Ŕ ŕ Ř ř & normal \\[1ex]
+% \scshape Ś Ş ş Š š Ţ ţ Ť ť & \scshape Ů ů Ű ű & \scshape Ź ź Ż ż Ž ž & \scshape small caps \\
+% Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž & normal \\\bottomrule
+% \end{tabular}
+% \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}). The following example lets you type, ``In Congreſs, July 4, 1776.''
+% \begin{quote}
+% |\usepackage{newunicodechar}|\\
+% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
+% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
+% |\newunicodechar{ſ}{\textlongs}|
+% \end{quote}
+%
+% Although |\newunicodechar{ā}{\=a}| allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive, one must be careful with control sequences like |\=a| fail when using \texttt{makeindex} and \texttt{gind.ist}. For example, the \textsf{ltxdoc} class, with \texttt{gind.ist}, turns the default ``actual'' character |@| into |=|. 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}.
+%
+% Such issues with \texttt{gind.ist} are not the only concerns one must have about NFSS, \textsf{inputenc}, and \textsf{fontenc} when using Unicode. Although the manner in which glyphs are handled is quite powerful, it also is fragile. Any \TeX\ macro that partitions its argument without using delimiters can break Unicode under NFSS.
+%
+% Consider the following examples with |\def\foo#1#2#3\relax{<#1#2><#3>}|:
+% \begin{quote}\setstretch{1.2}
+% \def\foo#1#2#3\relax{<#1#2><#3>}
+% \begin{tabular}{lll}\toprule
+% Argument & Macro & Result\\\midrule
+% |abc| & |\foo abc\relax| & \foo abc\relax\\
+% |{æ}bc| & |\foo {æ}bc\relax| & \foo {æ}bc\relax\\
+% \cmd{\ae bc} & |\foo \ae bc\relax| & \foo \ae bc\relax\\\bottomrule
+% \end{tabular}
+% \end{quote}
+%
+% The arguments in the last example always put |c| in |#3|, with the first two glyphs in |#1#2.| Now here is where things get tricky:
+% \begin{quote}\setstretch{1.2}
+% \begin{tabular}{llll}\toprule
+% Argument & Macro & Engine & Result\\\midrule
+% |æbc| & |\foo æbc\relax| & \texttt{xelatex} & <æb><c>\\
+% |æbc| & |\foo æbc\relax| & \texttt{lualatex} & <æb><c>\\
+% |æbc| & |\foo æbc\relax| & \texttt{pdflatex} & <æ><bc>\\\bottomrule
+% \end{tabular}
+% \end{quote}
+%
+% In both \texttt{xelatex} and \texttt{lualatex} you get the same results as the previous table, where |c| is in |#3| and the first two glyphs are in |#1#2.| However, using \texttt{pdflatex} with \textsf{inputenc} and \textsf{fontenc} causes |æ| by itself to use |#1#2|.
+%
+% Without digging into the details of font encoding and NFSS, we can say in simple terms that |æ| is ``two arguments wide.'' Any macro where this |#1#2| pair gets split into |#1| and |#2| will produce either the error \texttt{Unicode char \dots not set up for LaTeX} or the error \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}.} This is not just specific to \textsf{nameauth}.
+%
+% Using \cmd{\CapThis} can trigger this kind of error when the \emph{first} character of the \meta{SNN} field is an extended-Latin or similarly accented or extended Unicode character. Using \cmd{\AccentCapThis} can trigger this kind of error when the \emph{second} character of the \meta{SNN} field is a similarly accented or extended character.
+%
+% \LaTeX\ also removes spaces in a manner that one should remember:
+% \begin{quote}\setstretch{1.2}
+% \def\foo#1#2#3\relax{<#1#2><#3>}
+% \begin{tabular}{lll}\toprule
+% Argument & Macro & Result\\\midrule
+% |a b c| & |\foo a b c\relax| & \foo a b c\relax\\
+% |ab c| & |\foo ab c\relax| & \foo ab c\relax\\
+% |a bc| & |\foo a bc\relax| & \foo a bc\relax\\
+% |abc| & |\foo abc\relax| & \foo abc\relax\\\bottomrule
+% \end{tabular}
+% \end{quote}
+% Notice that if a space exists between the first two arguments,the space gets gobbled between the first two arguments, but retained in the third. This pertains to the way that \LaTeX\ allows for spaces after control sequences and tries to fetch the undelimited |#1#2.| Since |#3| terminates the argument list, it gets ``everything else.'' Nor would using \cmd{\obeyspaces} and \cmd{\ignorespaces} always get the desired result without a certain degree of complexity.
+%
+% Here is why using explicit spacing macros with one-character particles when using \cmd{\CapThis} and \cmd{\AccentCapThis} helps fix the issue of gobbled spaces, and why non-breaking spaces are preferred:\footnote{Given that you would not want a bad break between a particle and a name.}
+% \begin{quote}\small\setstretch{1.2}
+% \def\foo#1#2#3\relax{<#1#2><#3>}
+% \begin{tabular}{lll}\toprule
+% Argument & Macro & Result\\\midrule
+% |a~bc| & |\foo a~bc\relax| & \foo a~bc\relax\\
+% |a\nobreakspace bc| & |\foo a\nobreakspace bc\relax| & \foo a\nobreakspace bc\relax\\
+% |a\space bc| & |\foo a\space bc\relax| & \foo a\space bc\relax\\\bottomrule
+% \end{tabular}
+% \end{quote}
+%
+% Sections~\ref{sec:standards} and~\ref{sec:accents} have information related to these topics and the \textsf{nameauth} package.
+% \clearpage
+%
+% \subsubsection{\LaTeX\ Engines}
+% \label{sec:engines}
+%
+% The \textsf{nameauth} package tries to work with multiple languages and typesetting engines. The following preamble snippet from this manual illustrates how that can be done:
+% \begin{quote}
+% |\usepackage{ifxetex}|\\
+% |\usepackage{ifluatex}|\\
+% |\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|\hfill |% also uses fontspec|\\
+% \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\
+% \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\
+% \hbox{\quad}|\else|\hfill |% traditional NFSS|\\
+% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
+% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
+% \hbox{\quad}|\fi|\\
+% |\fi|
+% \end{quote}
+%
+% This arrangement worked best for this manual, which has been tested with all three engines. This example is not meant to be the only possible way to check which engine you are using and how to set things up.
+%
+% The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:
+%
+% \begin{quote}
+% |\ifxetex| \meta{xelatex text}|%|\\
+% |\else|\\
+% \hbox{\quad}|\ifluatex|\\
+% \hbox{\qquad}|\ifpdf |\meta{lualatex in pdf mode text}|%|\\
+% \hbox{\qquad}|\else |\meta{lualatex in dvi mode text}|%|\\
+% \hbox{\qquad}|\fi|\\
+% \hbox{\quad}|\else|\\
+% \hbox{\qquad}|\ifpdf |\meta{pdflatex text}|%|\\
+% \hbox{\qquad}|\else |\meta{latex text}|%|\\
+% \hbox{\qquad}|\fi|\\
+% \hbox{\quad}|\fi|\\
+% |\fi|
+% \end{quote}
+% \clearpage
+%
+% \subsubsection{\texttt{\textbackslash LocalNames}}
+% \label{sec:LocalNames}
+%
+% As mentioned previously in Section~\ref{sec:Tweaks}, both \cmd{\ForgetName} and \cmd{\SubvertName} usually affect both main-matter and front-matter names. This default behavior can be quite helpful. Nevertheless, there are cases where it is undesirable. This section shows \cmd{\Localnames} and \cmd{\Globalnames} in action, limiting the behavior of the ``tweaking macros'' to either the main or front matter.
+%
+% We begin by defining a macro that will report to us whether a name exists in the main matter, front matter, both, or none:
+% \def\CheckChuck{\IfFrontName[Charlie]{Chaplin}%
+% {\IfMainName[Charlie]{Chaplin}{both}{front}}%
+% {\IfMainName[Charlie]{Chaplin}{main}{none}}}%
+% \begin{quote}
+% |\def\CheckChuck{%\IfFrontName[Charlie]{Chaplin}%|\\
+% | {\IfMainName[Charlie]{Chaplin}{both}{front}}%|\\
+% | {\IfMainName[Charlie]{Chaplin}{main}{none}}}%|
+% \end{quote}
+% Next we create a formatted name in the main matter:
+% \begin{quote}
+% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% Now we switch to an unformatted section and create a name there. Observe that \cmd{\global} precedes \cmd{\NamesInactive} because we want those effects to persist beyond the immediate scope of the \texttt{quote} environment:
+% \begin{quote}
+% |\global\NamesInactive|\global\NamesInactive\\
+% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% Now we are in a ``front matter section.'' We now have two names. They look and behave the same, but are two different ``species'' with independent first and subsequent uses. We use \cmd{\Localnames} to make \cmd{\ForgetName} and \cmd{\SubvertName} local in scope. We then forget the name in the unformatted section:
+% \begin{quote}
+% |\LocalNames|\LocalNames\\
+% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% Since the ``front-matter name'' was removed, only a ``main-matter name'' exists. We now ``subvert'' the front-matter name to bring its ``existence'' back again and switch to the main section. See that \cmd{\global} precedes \cmd{\NamesActive} because we used \cmd{\global} previously and want a similar effect:
+% \begin{quote}
+% |\SubvertName[Charlie]{Chaplin}|\SubvertName[Charlie]{Chaplin}\\
+% |\global\NamesActive|\global\NamesActive\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% Now both names exist again, but \cmd{\ForgetName} and \cmd{\SubvertName} are still local in scope. We forget the main-matter name and additionally reset the default behavior so that \cmd{\ForgetName} and \cmd{\SubvertName} will be global:
+% \begin{quote}
+% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
+% |\GlobalNames|\GlobalNames\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% Finally, we forget everything. Even though we are in a main-matter section, the front-matter control sequence goes away:
+% \begin{quote}
+% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
+% |\CheckChuck|\hfill\CheckChuck
+% \end{quote}
+% \clearpage
+%
+% \subsubsection{Formatting Hooks}
+% \label{sec:moreC}
+%
+% Before\marginpar{\small\raggedleft Margin Paragraphs} we get to the use of text tags and name conditionals in name formatting, we begin with an intermediate example to illustrate that something more complex can occur in \cmd{\NamesFormat}. Here we put the first mention of a name in boldface, along with a marginal notation if possible:
+% \begin{quote}
+% |\let\OldFormat\NamesFormat%|\\
+% |\renewcommand*\NamesFormat[1]%|\\
+% | {\textbf{#1}\ifinner\else|\\
+% | \marginpar{\raggedleft\scriptsize #1}\fi}|\\
+% \dots\\
+% |\let\NamesFormat\OldFormat%|
+% \end{quote}
+% Changes to \cmd{\NamesFormat} should not rely merely on scoping rules to keep them ``local'' but should be changed and reset explicitly, or else odd side effects can result, especially with more exotic changes to \cmd{\NamesFormat}. We now use the example above in a sample text:
+% \begin{quote}
+% \let\OldFormat\NamesFormat%
+% \renewcommand*\NamesFormat[1]{\textbf{#1}\ifinner\else\marginpar{\raggedleft\scriptsize #1}\fi}%
+% |\PretagName{Vlad, Ţepeş}{Vlad Tepes}% for accented names|\\[2ex]
+% {\small |\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.%|}\\[2ex]
+% \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.%
+% \let\NamesFormat\OldFormat%
+% \end{quote}
+%
+% Now again we have reverted to the original form of \cmd{\NamesFormat} and we get \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}|. Do not mix these forms with each other or with the old syntax, lest errors bite! You would get multiple index entries, unwanted cross-references, and unexpected forms in the text. The simplified interface greatly helps one to avoid this.
+%
+% We continue\marginpar{\small\raggedleft Conditionals / Text Tags} onward to using not only name conditionals (Section~\ref{sec:tests}) but also text tags (Section~\ref{sec:tagtext}) to put tags after first references to main-matter names.
+%
+% \DescribeMacro{\if@nameauth@InName}
+% \DescribeMacro{\if@nameauth@InAKA}
+% The example \cmd{\NamesFormat} below adds a text tag to the first occurrences of main-matter names. It uses internal macros of \cmd{\@nameauth@Name.} To prevent errors, the Boolean values \cmd{\@nameauth@InName} and \cmd{\@nameauth@InAKA} are true only within the scope of \cmd{\@nameauth@Name} and \cmd{\AKA} respectively.
+%
+% \DescribeMacro{\@nameauth@toksa}
+% \DescribeMacro{\@nameauth@toksb}
+% \DescribeMacro{\@nameauth@toksc}
+% This package makes three token registers available to facilitate using the name conditional macros as we do below. Using these registers allows accented names to be recognized properly. In \cmd{\AKA} the token registers are copies of the \emph{last} three arguments, corresponding to the pseudonym. Nevertheless, they have the same names as the registers in \cmd{\@nameauth@Name} because they work the same way and may be easier to use this way.
+% \clearpage
+%
+% \begin{quote}\small
+% |\newif\ifNoTextTag%|\hfill|allows us to work around \ForgetName|\\
+% |\let\OldFormat\NamesFormat%|\hfill|save the format|\\
+% |\makeatletter%|\hfill|access internals|\\
+% |\renewcommand*\NamesFormat[1]%|\\
+% |{%|\\
+% | \let\ex\expandafter%|\hfill|reduce typing|\\
+% | \textbf{#1}%|\\
+% | \if@nameauth@InName%|\hfill|do only in \@nameauth@Name|\\
+% | \ifNoTextTag%|\hfill|true branch disables tags|\\
+% | \else%|\hfill|take false branch|\\
+% | \ex\ex\ex\ex\ex\ex\ex\IfMainName\ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | {}%|\hfill|skip true branch to get first use|\\
+% | {%|\\
+% | \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | }%|\hfill|this form allows accents/control sequences|\\
+% | \fi|\\
+% | \fi|\\
+% | \if@nameauth@InAKA%|\hfill|do only in \AKA|\\
+% | \ifNoTextTag\else|\\
+% | \ex\ex\ex\ex\ex\ex\ex\IfAKA%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | {}%|\hfill|skip true branch to get first use|\\
+% | {%|\\
+% | \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | }%|\hfill|this form allows accents/control sequences|\\
+% | {}%|\hfill|skip excluded branch|\\
+% | \fi|\\
+% | \fi|\\
+% | \global\NoTextTagfalse%|\hfill|reset tag suppression|\\
+% |}|\\
+% |\makeatother%|
+% \end{quote}
+%
+% The example above uses \cmd{\NoTextTagtrue} to suppress tags and prints then by default in the false path. A different approach would print the tags only on the true path and still set \cmd{\NoTextTagfalse} at the end, so that the tags would only print when explicitly triggered.
+%
+% Before we can refer to any text tags, we must create them. Please pardon the fact that I am going to ``lie'' about the tag used for ``Atatürk'' below in order to illustrate certain points regarding \cmd{\AKA.} I will tell the truth later when this group of examples is complete:
+% \begin{quote}\small
+% |\NameAddInfo[George]{Washington}{ (1732--99)}%|\\
+% |\NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}%|\\
+% |\NameAddInfo{Atatürk}{ (a special surname granted 1934)}%|
+% \end{quote}
+% \NameAddInfo[George]{Washington}{ (1732--99)}%
+% \NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}%
+% \NameAddInfo{Atatürk}{ (a special surname granted 1934)}%
+% \NameAddInfo{\kern0pt Atatürk}{ (a special surname granted 1934)}%
+% \NameAddInfo{Atatürk\kern0pt}{ (a special surname granted 1934)}%
+% \NameAddInfo{\kern0pt Atatürk\kern0pt}{ (a special surname granted 1934)}%
+%
+% We begin using the modified \cmd{\NamesFormat} under normal conditions:
+% \newif\ifNoTextTag%
+% \let\OldFormat\NamesFormat%
+% \makeatletter\renewcommand*\NamesFormat[1]{\let\ex\expandafter\textbf{#1}\if@nameauth@InName\ifNoTextTag\else\ex\ex\ex\ex\ex\ex\ex\IfMainName\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]{}{\ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]}\fi\fi\if@nameauth@InAKA\ifNoTextTag\else\ex\ex\ex\ex\ex\ex\ex\IfAKA\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]{}{\ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]}{}\fi\fi\global\NoTextTagfalse}\makeatother
+% \ForgetName[George]{Washington}%
+% \begin{quote}\small
+% |\Wash| |held| |office| |1789--97.| |No| |tags| |appear| |in| |later| |uses| |of| |\Wash.| |We| |now| |suppress| |the| |dates| |and| |trigger| |a| |new| |first| |use:|\\
+% |\NoTextTagtrue\ForgetName[George]{Washington}\Wash.|
+%
+% |\Name[Mustafa]{Kemal}| |was| |later| |given| |the| |name%|\\ |\AKA[Mustafa]{Kemal}{Atatürk}.|
+%
+% \Wash\ held office 1789--97. No tags appear in later uses of \Wash. We now suppress the dates and trigger a new first use: \NoTextTagtrue\ForgetName[George]{Washington}\Wash.
+%
+% \Name[Mustafa]{Kemal} was later given the name \IndexInactive\AKA[Mustafa]{Kemal}{\kern0pt Atatürk}\IndexActive.
+% \end{quote}
+%
+% Notice that the tag for Atatürk did not print. That is because \cmd{\AKA} only prints a formatted name when \cmd{\NamesActive} is in force and the \texttt{alwaysformat} option is set. We now forget \Wash\ and \Name[Mustafa]{Kemal}, using the same text but now simulating the effects of \texttt{alwaysformat}:\makeatletter\@nameauth@AlwaysFormattrue\makeatother
+% \begin{quote}\small
+% \ForgetName[George]{Washington}%
+% \ForgetName[Mustafa]{Kemal}%
+% \Wash\ held office 1789--97. No tags appear in later uses of \Wash. We now suppress the dates and trigger a new first use: \NoTextTagtrue\ForgetName[George]{Washington}\Wash.
+%
+% \Name[Mustafa]{Kemal} was later given the name \IndexInactive\AKA[Mustafa]{Kemal}{Atatürk\kern0pt}\IndexActive.
+% \end{quote}\makeatletter\@nameauth@AlwaysFormatfalse\makeatother
+% Here we see that the tag is printed because \cmd{\NamesFormat} is called for every use. Still, the tags will not print with \cmd{\NamesInactive.} Before we get to the solution of that issue, perhaps it would help to think about what is happening:
+% \begin{enumerate}
+% \item In \cmd{\@nameauth@name} and \cmd{\AKA}:
+% \begin{enumerate}
+% \item Parse name arguments. Save an unexpanded copy of each relevant name argument in a token register.
+% \item Check for a control sequence based on them.
+% \item Enter a decision route based on the result. Yes means the name exists. No means it does not. The decision route engages the Boolean values governing formatting.
+% \item Generate the index and print forms of the name. Create the index entry from the former and pass the latter onward to the format switching function, which decides if it is formatted main matter, regular main matter, or front matter as the Boolean values dictate.
+% \end{enumerate}
+% \item In the hooks and \cmd{\NamesFormat}:
+% \begin{enumerate}
+% \item Normally you do nothing and exit, or make a local font change and exit. You could do more complex tasks.\footnote{One could discard the text output of the naming macros, retaining only the indexing functionality, then re-parse the name parameters and create a custom form of text output. One possibility could allow a more flexible Continental approach with macros that expand to \cmd{\textsc} except in the hook macros, where they output format only surnames, but perhaps not always.}
+% \item You also can make more than one independent check for a control sequence based on the name arguments saved in the token registers. This permits some fairly complex actions based on both the Boolean values and the control sequences themselves.
+% \item Thus your decision route could turn into a tree or a set of relationships among a number of names.
+% \item Print the form of the name as it was passed, or possibly do something else altogether.
+% \item \textbf{If you invoke \cmd{\@nameauth@name} and \cmd{\AKA} from within the hooks, they will do nothing.}
+% \end{enumerate}
+% \item In \cmd{\@nameauth@name} and \cmd{\AKA}:
+% \begin{enumerate}
+% \item Generate the control sequence that says the name exists.
+% \item clean up and exit.
+% \end{enumerate}
+% \end{enumerate}
+% \DescribeMacro{\MainNameHook}
+% \DescribeMacro{\FrontNameHook}
+% \cmd{\AKA} can print a tag only once because its control sequences cannot be undefined by the \textsf{nameauth} macros. No tags are printed when \cmd{\NamesInactive} turns off formatting\,---\,even with \texttt{alwaysformat.} Two additional hooks address these limitations. \cmd{\MainNameHook} is triggered when \cmd{\NamesActive} is and \cmd{\NamesFormat} is not invoked. \cmd{\FrontNameHook} always is invoked when \cmd{\NamesInactive} is invoked. These hooks compliment \cmd{\NamesFormat.} With the examples below we use tags in the front matter and with the normal first-use case of \cmd{\AKA.}
+% \begin{quote}\small
+% |\let\OldFrontHook\FrontNameHook%|\hfill|save the hook|\\
+% |\let\OldMainHook\MainNameHook%|\hfill|save the hook|\\
+% |\makeatletter%|\hfill|access internals|\\
+% |\renewcommand*\MainNameHook[1]%|\\
+% |{%|\\
+% | \let\ex\expandafter%|\hfill|reduce typing|\\
+% | {#1}%|\\
+% | \if@nameauth@InAKA%|\hfill|do only in \AKA|\\
+% | \ifNoTextTag\else|\\
+% | \ex\ex\ex\ex\ex\ex\ex\IfAKA%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | {}%|\hfill|skip true branch to get first use|\\
+% | {%|\\
+% | \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | }%|\hfill|this form allows accents/control sequences|\\
+% | {}%|\hfill|skip excluded branch|\\
+% | \fi|\\
+% | \fi|\\
+% | \global\NoTextTagfalse%|\hfill|reset tag suppression|\\
+% |}|\\
+% \clearpage
+% |\renewcommand*\FrontNameHook[1]%|\\
+% |{%|\\
+% | \let\ex\expandafter%|\hfill|reduce typing|\\
+% | {#1}%|\\
+% | \if@nameauth@InName%|\hfill|do only in \@nameauth@Name|\\
+% | \ifNoTextTag\else|\\
+% | \ex\ex\ex\ex\ex\ex\ex\IfFrontName%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | {}%|\hfill|skip true branch to get first use|\\
+% | {%|\\
+% | \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | }%|\hfill|this form allows accents/control sequences|\\
+% | {}%|\hfill|skip excluded branch|\\
+% | \fi|\\
+% | \fi|\\
+% | \if@nameauth@InAKA%|\hfill|do only in \AKA|\\
+% | \ifNoTextTag\else|\\
+% | \ex\ex\ex\ex\ex\ex\ex\IfAKA%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | {}%|\hfill|skip true branch to get first use|\\
+% | {%|\\
+% | \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%|\\
+% | \ex\ex\ex\ex\ex\ex\ex[%|\\
+% | \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]%|\\
+% | \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%|\\
+% | \ex[\the\@nameauth@toksc]%|\\
+% | }%|\hfill|this form allows accents/control sequences|\\
+% | {}%|\hfill|skip excluded branch|\\
+% | \fi|\\
+% | \fi|\\
+% | \global\NoTextTagfalse%|\hfill|reset tag suppression|\\
+% |}|
+% |\makeatother%|
+% \end{quote}
+%
+% \let\OldFrontHook\FrontNameHook%
+% \let\OldMainHook\MainNameHook%
+% \makeatletter
+% \renewcommand*\FrontNameHook[1]{\let\ex\expandafter{#1}\if@nameauth@InName\ifNoTextTag\else\ex\ex\ex\ex\ex\ex\ex\IfFrontName\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]{}{\ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]}{}\fi\fi\if@nameauth@InAKA\ifNoTextTag\else\ex\ex\ex\ex\ex\ex\ex\IfAKA\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]{}{\ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]}{}\fi\fi\global\NoTextTagfalse}
+% \renewcommand*\MainNameHook[1]{\let\ex\expandafter{#1}\if@nameauth@InAKA\ifNoTextTag\else\ex\ex\ex\ex\ex\ex\ex\IfAKA\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]{}{\ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]}{}\fi\fi\global\NoTextTagfalse}
+% \makeatother%
+% \clearpage
+% We forget \Wash\ and \Name[Mustafa]{Kemal}, then see the text as front matter:
+% \begin{quote}\small
+% \NamesInactive%
+% \ForgetName[George]{Washington}%
+% \ForgetName[Mustafa]{Kemal}%
+% \Wash\ held office 1789--97. No tags appear in later uses of \Wash. We now suppress the dates and trigger a new first use: \NoTextTagtrue\ForgetName[George]{Washington}\Wash.
+%
+% \Name[Mustafa]{Kemal} was later given the name \IndexInactive\AKA[Mustafa]{Kemal}{\kern0pt Atatürk\kern0pt}\IndexActive.
+% \end{quote}
+%
+% Finally we have the same text as main matter:
+% \begin{quote}\small
+% \NamesActive%
+% \ForgetName[George]{Washington}%
+% \ForgetName[Mustafa]{Kemal}%
+% \Wash\ held office 1789--97. No tags appear in later uses of \Wash. We now suppress the dates and trigger a new first use: \NoTextTagtrue\ForgetName[George]{Washington}\Wash.
+%
+% \Name[Mustafa]{Kemal} was later given the name \AKA[Mustafa]{Kemal}{Atatürk}.
+% \end{quote}
+% \let\MainNameHook\OldMainHook%
+% \let\FrontNameHook\OldFrontHook%
+% \let\NamesFormat\OldFormat%
+%
+% Please be aware that each instance of \AKA[Mustafa]{Kemal}{Atatürk} in the four example paragraphs above actually was a different name, even though they look the same:
+% \begin{quote}\small
+% |\NameAddInfo{Atatürk}{| |(a| |special| |surname| |granted| |1934)}|\\
+% |\NameAddInfo{\kern0pt| |Atatürk}{| |(a| |special| |surname| |granted| |1934)}|\\
+% |\NameAddInfo{Atatürk\kern0pt}{| |(a| |special| |surname| |granted| |1934)}|\\
+% |\NameAddInfo{\kern0pt| |Atatürk\kern0pt}{| |(a| |special| |surname| |granted| |1934)}|
+% \end{quote}
+% Because the names were different, I suppressed all but one of the variants from appearing in the index by putting the undesired extras between \cmd{\IndexInactive} and \cmd{\IndexActive.}
+%
+% Please do remember that \cmd{\IfAKA} will only expand to the false route before the first appearance of a pseudonym. Otherwise it will remain true for the rest of the document. Please do not let these examples mislead you in that regard. They are merely illustrative of hypothetical first uses.
+%
+% \let\OldMainHook\MainNameHook%
+% The next example shows how you cannot re-enter \cmd{\Name} or \cmd{\AKA} from within \cmd{\Namesformat,} \cmd{\FrontNameHook,} or \cmd{\MainNameHook.}
+% \begin{quote}\small
+% |\renewcommand*\MainNameHook[1]%|\\
+% |{%|\\
+% | {#1}%|\\
+% | \IndexInactive%|\\
+% | \Name{foo}\AKA{bar}{baz}%|\\
+% | \IndexActive%|\\
+% |}|
+% \end{quote}
+% \renewcommand*\MainNameHook[1]{{#1}\IndexInactive\Name{foo}\AKA{bar}{baz}\IndexActive}%
+% Calling |\Wash| produces \Wash. \cmd{\Name} and \cmd{\AKA} both exit and do nothing. Version 2.4 of \textsf{nameauth} prevents stack-overflows for the above example and the odd case of calling the naming macros as their own arguments. Nevertheless, |\Name{foo\Name{bar}}| would produce ``\textsc{foo}'' in the text and ``foo\textsc{bar}'' in the index. One might want to avoid such cases.
+% \renewcommand*\MainNameHook{}
+% \renewcommand*\FrontNameHook{}
+% \clearpage
+%
+% \subsubsection{Variant Spellings}
%
% 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.
%
@@ -2041,64 +2492,64 @@ Running "make install" installs the files in the local TeX tree.
% \label{sec:PatRef}
%
% \subsubsection{Basic Naming}
-% \noindent{\bfseries Western Names}\\[2ex]{\small
-% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\hline{\large\strut}
+% \noindent{\bfseries Western Names}\\[2ex]{\small\setstretch{1.1}
+% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\toprule
% \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}|\\[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.]|\\[1ex]{\large\strut}
-% \textit{Subsequent full}: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\{\large\strut}
-% \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
+% |\Name*[John]{Smith}|\newline |\Name[John]{Smith}|\newline |\FName[John]{Smith}|\\[1ex]
+% \textit{Subsequent full}: \Name*[John]{Smith} & |\Name*[John]{Smith}|\\[1ex]
+% \textit{Subsequent surname}: \Name[John]{Smith} & |\Name[John]{Smith}|\\[1ex]
+% \textit{Subsequent forename}: \FName[John]{Smith} & |\FName[John]{Smith}|\\\midrule
+% \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]
+% \textit{Subsequent full}: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\[1ex]
+% \textit{Alternate}: \Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\\[1ex]
+% \textit{Alternate}: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\\bottomrule
% \end{tabular}}
% \vfil
%
% \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
+% Always use a comma to delimit name/affix pairs.\\[2ex]{\small\setstretch{1.1}
+% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\toprule
+% \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]
+% \textit{Subsequent}: \Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\\[1ex]
+% \textit{Subsequent surname}: \Name[George S.]{Patton, Jr.} & |\Name[George S.]{Patton, Jr.}|\\[1ex]
+% \textit{Subsequent forename}: \FName[George S.]{Patton, Jr.}[George] & |\FName[George S.]{Patton, Jr.}[George]|\\\bottomrule
% \end{tabular}}
% \vfil
%
-%\noindent |\begin{nameauth}|\\
+%{\noindent |\begin{nameauth}|\\
%| \< Smith & John & Smith & >|\\
%| \< JQP & J.Q. & Public & >|\\
%| \< Patton & George S. & Patton, Jr. & >|\\
-%|\end{nameauth}|
+%|\end{nameauth}|}
% \vfil
%
-% \ForgetName[John]{Smith}\ForgetName[J.Q.]{Public}\ForgetName[George S.]{Patton, Jr.}%
+% {\setstretch{1.1}\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]
+% \indent \Smith, \LSmith, \Smith, and \SSmith\\
% |\JQP[Jane Q.],| |\LJQP[Jane Q.],| |and| |\JQP[Jane Q.]|:\\
-% \indent \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.]\\[1ex]
+% \indent \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.]\\
% |\LJQP[Jane| |Qetsiyah]\| |and| |\SJQP[Janie]|:\\
-% \indent \LJQP[Jane Qetsiyah]\ and \SJQP[Janie]\\[1ex]
+% \indent \LJQP[Jane Qetsiyah]\ and \SJQP[Janie]\\
% \noindent |\Patton,| |\LPatton,| |\Patton,| |and| |\SPatton|:\\
-% \indent \Patton, \LPatton, \Patton, and \SPatton.\\[1ex]
-% |\SPatton[George]| prints \SPatton[George].
+% \indent \Patton, \LPatton, \Patton, and \SPatton.\\
+% |\SPatton[George]| prints \SPatton[George].}
% \clearpage
%
% \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}|\\[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}|\\[1ex]{\large\strut}
-% {\large\strut}\textit{Subsequent}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\hline
+% 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\setstretch{1.1}
+% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\toprule
+% \textit{First reference}: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]
+% \textit{Subsequent full}: \Name*{Francis, I} & |\Name*{Francis, I}|\\[1ex]
+% \textit{Subsequent name}: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]
+% \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]
+% \textit{Subsequent full}: \Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\\[1ex]
+% \textit{Subsequent name}: \Name{Demetrius, I Soter} & |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\\midrule
+% \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]
+% \textit{Subsequent full}: \Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\\[1ex]
+% \textit{Subsequent name}: \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\\midrule
+% \textit{First mononym reference}:\newline\hbox to 1em{\hfil}\ForgetName{Plato}\Name{Plato} &
+% |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\[1ex]
+% \textit{Subsequent}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\bottomrule
% \end{tabular}}
% \vfil
%
@@ -2110,31 +2561,31 @@ Running "make install" installs the files in the local TeX tree.
%|\end{nameauth}|
% \vfil
%
-% \ForgetName{Francis, I}\ForgetName{Demetrius, I Soter}\ForgetName{Sun, Yat-sen}\ForgetName{Plato}%
+% {\setstretch{1.1}\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]
+% \indent \Francis, \LFrancis, \Francis, and \SFrancis\\
% |\Dem,| |\LDem,| |\Dem,| |and \SDem|:\\
-% \indent \Dem, \LDem, \Dem, and \SDem\\[1ex]
+% \indent \Dem, \LDem, \Dem, and \SDem\\
% |\Sun,| |\LSun,| |\Sun,| |and \SSun|:\\
-% \indent \Sun, \LSun, \Sun, and \SSun\\[1ex]
+% \indent \Sun, \LSun, \Sun, and \SSun\\
% |\Plato,| |\LPlato,| |\Plato,| |and \SPlato|:\\
-% \indent \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}\\[2ex]
-% Avoid these forms except with the \texttt{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
+% Avoid these forms except with the \texttt{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\setstretch{1.1}
+% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\toprule
+% \textit{First reference}: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]
+% \textit{Subsequent full}: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\[1ex]
+% \textit{Subsequent name}: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]
+% \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]
+% \textit{Subsequent full}: \Name*{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\\[1ex]
+% \textit{Subsequent name}: \Name{Ptolemy}[I Soter] & |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\\midrule
+% \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]
+% \textit{Subsequent full}: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\[1ex]
+% \textit{Subsequent name}: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\\bottomrule
% \end{tabular}}
% \vfil
%
@@ -2145,13 +2596,13 @@ Running "make install" installs the files in the local TeX tree.
%|\end{nameauth}|
% \vfil
%
-% \ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]%
+% {\setstretch{1.1}\ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]%
% \noindent |\Henry, \LHenry, \Henry, and \SHenry|:\\
-% \indent \Henry, \LHenry, \Henry, and \SHenry\\[1ex]
+% \indent \Henry, \LHenry, \Henry, and \SHenry\\
% |\Ptol,| |\LPtol,| |\Ptol,| |and \SPtol|:\\
-% \indent \Ptol, \LPtol, \Ptol, and \SPtol\\[1ex]
+% \indent \Ptol, \LPtol, \Ptol, and \SPtol\\
% |\Mao, \LMao, \Mao, and \SMao|:\\
-% \indent \Mao, \LMao, \Mao, and \SMao
+% \indent \Mao, \LMao, \Mao, and \SMao}
% \vfil
%
% 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.
@@ -2167,27 +2618,27 @@ Running "make install" installs the files in the local TeX tree.
%
% \subsubsection{Particles}
% \label{sec:Particles}
-% 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
+% The following illustrate the American style of particulate names.\\[2ex]{\small\setstretch{1.1}
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\toprule
+% \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]
+% \textit{Subsequent}: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\[1ex]
+% \textit{Start of sentence}: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\[1ex]
+% \textit{Forename}: \FName[Walter]{de la Mare} & |\FName[Walter]{de la Mare}|\\\bottomrule
% \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
+% \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\setstretch{1.1}
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\toprule
+% \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]
+% \textit{Subsequent}: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\[1ex]
+% \textit{Forenames}: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\\bottomrule
% \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
+% \noindent These latter examples of the Continental style use the nickname feature to omit the particles from the index.\\[2ex]{\small\setstretch{1.1}
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\toprule
+% \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]
+% \textit{Subsequent full}: \Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\
+% \textit{Subsequent surname}: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\[1ex]
+% \textit{Subsequent forename}: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\\bottomrule
% \end{tabular}}
% \vfil
%
@@ -2262,14 +2713,16 @@ Running "make install" installs the files in the local TeX tree.
% \fi
% \small
% \subsection{Boolean Values}
-% \noindent{\large\bfseries Affix Commas}\\[.5ex]
-% The \texttt{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|.
+%
+% \noindent{\large\bfseries Affix Commas}\\[0.5ex]
+% The \texttt{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}\medskip
-% \noindent{\large\bfseries Toggle Formatting}\\[.5ex]
-% \cmd{\NamesActive} and \cmd{\NamesInactive} or the |mainmatter| and |frontmatter| options set this value below.
+%
+% \noindent{\large\bfseries Toggle Formatting}\\[0.5ex]
+% \cmd{\NamesActive} and \cmd{\NamesInactive} or the |mainmatter| and |frontmatter| options set or clear the value below. |\@nameauth@DoFormatfalse| ensures that \cmd{\FrontNameHook} is called for all front-matter names.
% \begin{macrocode}
\newif\if@nameauth@DoFormat
% \end{macrocode}
@@ -2277,7 +2730,8 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\newif\if@nameauth@LocalNames
% \end{macrocode}\medskip
-% \noindent{\large\bfseries Indexing}\\[.5ex]
+%
+% \noindent{\large\bfseries Indexing}\\[0.5ex]
% \cmd{\IndexActive} and \cmd{\IndexInctive} or the |index| and |noindex| options set this below:
% \begin{macrocode}
\newif\if@nameauth@DoIndex
@@ -2286,7 +2740,14 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\newif\if@nameauth@Pretag
% \end{macrocode}\medskip
-% \noindent{\large\bfseries Name Formatting}\\[.5ex]
+%
+% \noindent{\large\bfseries Syntactic Formatting}\\[0.5ex]
+% |\@nameauth@FullName| toggles long or short forms in subsequent name uses. As a corollary, |\@nameauth@FirstName| is used when printing only first names. |\@nameauth@AltAKA| is toggled respectively by \cmd{\AKA} and \cmd{\AKA*} to print a longer or shorter name.
+% \begin{macrocode}
+\newif\if@nameauth@FullName
+\newif\if@nameauth@FirstName
+\newif\if@nameauth@AltAKA
+% \end{macrocode}
% The next Boolean values govern full name capitalization, name reversing, and name reversing with commas.
% \begin{macrocode}
\newif\if@nameauth@AllCaps
@@ -2296,61 +2757,99 @@ Running "make install" installs the files in the local TeX tree.
\newif\if@nameauth@RevAllComma
\newif\if@nameauth@RevThisComma
% \end{macrocode}
-% |@nameauth@FirstFormat| toggles the formatting of first occurrences of names.\\ |@nameauth@AlwaysFormat| forces name formatting whenever formatting is active.
+% This Boolean value is triggered by \cmd{\CapThis} and reset by \cmd{\Name} and \cmd{\AKA}.
% \begin{macrocode}
-\newif\if@nameauth@FirstFormat
-\newif\if@nameauth@AlwaysFormat
+\newif\if@nameauth@DoCaps
% \end{macrocode}
-% |@nameauth@FullName| toggles long or short forms in subsequent name uses.\\ |@nameauth@FirstName| is used when printing only first names. |@nameauth@AltAKA| is toggled by either \cmd{\AKA} or \cmd{\AKA*} to print a longer or shorter name.
+% This Boolean value is triggered by \cmd{\AccentCapThis} to handle special cases of extended Unicode particle caps. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
% \begin{macrocode}
-\newif\if@nameauth@FullName
-\newif\if@nameauth@FirstName
-\newif\if@nameauth@AltAKA
+\newif\if@nameauth@Accent
% \end{macrocode}
-% \cmd{\KeepAffix} toggles the value below. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
+% \cmd{\KeepAffix} toggles the value below, which causes \cmd{\Name} and \cmd{\AKA} to use non-breaking spaces between a name and an affix, then reset the value.
% \begin{macrocode}
\newif\if@nameauth@NBSP
% \end{macrocode}
-% This Boolean value is used for detection of affixes and final periods.
+% This Boolean value is used for detection of double full stops at the end of a name.
% \begin{macrocode}
\newif\if@nameauth@Punct
-% \end{macrocode}
-% This Boolean value is triggered by \cmd{\CapThis}. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
+% \end{macrocode}\medskip
+%
+% \noindent{\large\bfseries Typographic Formatting}\\[0.5ex]
+% |\@nameauth@FirstFormat| toggles the formatting of main-matter names by triggering whether \cmd{\NamesFormat} is called or whether \cmd{\MainNameHook} is called. Additionally, |\@nameauth@AlwaysFormat| forces name formatting whenever |\@nameauth@DoFormat| is true by setting |\@nameauth@FirstFormattrue.|
% \begin{macrocode}
-\newif\if@nameauth@DoCaps
+\newif\if@nameauth@FirstFormat
+\newif\if@nameauth@AlwaysFormat
+% \end{macrocode}\medskip
+%
+% \noindent{\large\bfseries Who Called Me?}\\[0.5ex]
+% These values are true within \cmd{\Name} and \cmd{\AKA}, respectively. Otherwise they are false. Normally they have no effect, but they are available for special customizations of \cmd{\NamesFormat,} \cmd{\MainNameHook,} and \cmd{\FrontNameHook.} See Section~\ref{sec:moreC}.
+% \begin{macrocode}
+\newif\if@nameauth@InAKA
+\newif\if@nameauth@InName
% \end{macrocode}
-% This Boolean value is triggered by \cmd{\AccentCapThis} to handle special cases of extended Unicode particle caps. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
+% As a side note, \cmd{\AKA} will invoke \cmd{\NamesFormat} if the \texttt{alwaysformat} option is set and \cmd{\NamesActive}. Otherwise it will invoke \cmd{\MainNameHook} in the main matter and \cmd{\FrontNameHook} in the front matter (\cmd{\NamesInactive}). Thus you need to check both Boolean values above to get the desired outcomes for these hooks.\medskip
+%
+% \noindent{\large\bfseries Stack Overflow Prevention}\\[0.5ex]
+% Here is the locking mechanism that prevents a stack overflow via recursive calls to \cmd{\Name} and \cmd{\AKA}. See Section~\ref{sec:moreC}.
% \begin{macrocode}
-\newif\if@nameauth@Accent
+\newif\if@nameauth@Lock
% \end{macrocode}
% \subsection{Hooks}
% \begin{macro}{\NamesFormat}
-% Change typographic formatting of final complete name form in text. See Section~\ref{sec:formatting}.
+% Change typographic formatting of final complete name form in text. See Sections~\ref{sec:formatting} and~\ref{sec:moreC}. Called when |\@nameauth@DoFormattrue| and |\@nameauth@FirstFormattrue.|
% \begin{macrocode}
\newcommand*{\NamesFormat}{}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\MainNameHook}
+% \changes{v2.4}{2016/03/15}{Added}
+% Hook for when a non-formatted main-matter name is printed (Section~\ref{sec:moreC}).
+% \begin{macrocode}
+\newcommand*{\MainNameHook}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\FrontNameHook}
+% \changes{v2.4}{2016/03/15}{Added}
+% Hook for when a non-formatted front-matter name is printed (Section~\ref{sec:moreC}).
+% \begin{macrocode}
+\newcommand*{\FrontNameHook}{}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\NameauthName}
% \changes{v2.2}{2015/12/01}{Added}
-% Hook to create custom naming macros. Usually these three macros have the same control sequence, but they need not do so if you want something different. See Section~\ref{sec:formatting}.
+% Hook to create custom naming macros. Usually the three macros below have the same control sequence, but they need not do so if you want something different. See Section~\ref{sec:formatting}. Use at your own risk! Changing these macros basically rewrites this package.
% \begin{macrocode}
\newcommand*{\NameauthName}{\@nameauth@Name}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthLName}
% \changes{v2.3}{2016/01/05}{Added}
-% Hook to create custom naming macros. Called after |@nameauth@FullName| is set true. See Section~\ref{sec:formatting}.
+% Customization hook called after \cmd{\@nameauth@FullName} is set true. See Section~\ref{sec:formatting}.
% \begin{macrocode}
\newcommand*{\NameauthLName}{\@nameauth@Name}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthFName}
% \changes{v2.2}{2015/12/01}{Added}
-% Hook to create custom naming macros. Called after |@nameauth@FirstName| is set true. See Section~\ref{sec:formatting}.
+% Customization hook called after \cmd{\@nameauth@FirstName} is set true. See Section~\ref{sec:formatting}.
% \begin{macrocode}
\newcommand*{\NameauthFName}{\@nameauth@Name}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
+% \noindent{\large\bfseries Name Argument Token Registers}\\[0.5ex]
+% These three token registers contain the current values of the name arguments passed to \cmd{\Name}, its variants, and the cross-reference fields of \cmd{\AKA.}
+% \begin{macrocode}
+\newtoks\@nameauth@toksa%
+\newtoks\@nameauth@toksb%
+\newtoks\@nameauth@toksc%
+% \end{macrocode}
+% These three token registers contain the current values of the name arguments in each line od the \texttt{nameauth} environment.
+% \begin{macrocode}
+\newtoks\@nameauth@etoksb%
+\newtoks\@nameauth@etoksc%
+\newtoks\@nameauth@etoksd%
+% \end{macrocode}
% \subsection{Package Options}
% The following package options interact with many of the prior Boolean values.
% \begin{macrocode}
@@ -2385,7 +2884,6 @@ Running "make install" installs the files in the local TeX tree.
smallcaps}
\ProcessOptions\relax
% \end{macrocode}
-% \clearpage\noindent
% Now we load the required packages. They facilitate the first/subsequent name uses, the parsing of arguments, and the implementation of starred forms.
% \begin{macrocode}
\RequirePackage{etoolbox}
@@ -2395,11 +2893,13 @@ Running "make install" installs the files in the local TeX tree.
\RequirePackage{suffix}
\RequirePackage{xargs}
% \end{macrocode}
-% This macro determines the ``actual'' character for index sorting.
-% \begin{macrocode}
-\newcommand*\@nameauth@Actual{@}
-% \end{macrocode}
+%
+% The \textsf{etoolbox} package is essential for bringing the modern functionality of $\epsilon$-\TeX\ in parsing and passing the name parameters, etc. Using \textsf{xargs} allows for the optional arguments to work in a fairly wide set of environments.\footnote{Early versions of this package used \LaTeX3 functionality that was powerful. Yet the naming macros broke in some cases, like in \cmd{\marginpar} and some other environments.}
+% Using \textsf{suffix} facilitated macros like \cmd{\Name*}, although one might argue whether or not a ``starred form'' is the best approach, especially when \textsf{suffix} and \textsf{xargs} have some compatibility issues. Finally, \textsf{trimspaces} helps the fault tolerance of name arguments and \textsf{ifluatex/ifxetex} allow accented names to work on different \LaTeX\ engines.
+%
% \subsection{Internal Macros}
+%
+% \noindent{\large\bfseries Name Control Sequence: Who Am I?}
% \begin{macro}{\@nameauth@Clean}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string, even using accented characters, based on the arguments 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}
@@ -2408,6 +2908,7 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
+% \noindent{\large\bfseries Core Name Parsing Operations}
% \begin{macro}{\@nameauth@Root}
% \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 arguments) are expandable in order to facilitate proper indexing functionality. They form the kernel of the suffix removal and comma suppression features.
@@ -2449,7 +2950,7 @@ Running "make install" installs the files in the local TeX tree.
}
% \end{macrocode}
% \end{macro}
-% \clearpage
+%
% \begin{macro}{\@nameauth@CRii}
% \changes{v0.95}{2012/02/17}{Added}
% \changes{v1.26}{2012/04/24}{Fixed}
@@ -2494,6 +2995,7 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
+% \noindent{\large\bfseries Punctuation Detection}
% \begin{macro}{\@nameauth@TestDot}
% This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for a period at the end of its argument. It determines whether we need to call \cmd{\@nameauth@CheckDot} below.
% \begin{macrocode}
@@ -2524,12 +3026,15 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
% \clearpage
+%
+% \noindent{\large\bfseries Name Hook Dispatcher}
% \begin{macro}{\@nameauth@FmtName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \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.
+% \changes{v2.4}{2016/03/15}{Add hooks for non-formatted names}
+% 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. \cmd{\@nameauth@InHook} prevents one from calling either \cmd{\Name} or \cmd{\AKA} from within the hook macros.
% \begin{macrocode}
\newcommand*{\@nameauth@FmtName}[1]%
{%
@@ -2539,13 +3044,25 @@ Running "make install" installs the files in the local TeX tree.
\if@nameauth@FirstFormat
\bgroup\NamesFormat{#1}\egroup%
\else
- #1%
+ \bgroup\MainNameHook{#1}\egroup%
\fi
\else
- #1%
+ \bgroup\FrontNameHook{#1}\egroup%
\fi
}
% \end{macrocode}
+% This mechanism relies solely on Boolean values that determine which hook macro to call. Those values are set within \cmd{\@nameauth@name} and \cmd{\AKA,} where they also affect branching. However, the name conditional macros act directly, based on the presence or absence of control sequences determined by the interplay of name arguments, the Boolean values checked above, and the control sequences generated by that interaction.
+%
+% Perhaps a metaphor for this sort of ``double interaction'' could be ``double-clutching'' or, alternately, the difference between a manual and an automatic transmission. From the back-end side, you use the Boolean values and the name conditionals to perform a sort of ``torque matching'' between what goes in to the hook macros and what you want to happen when they complete. From the user side, this happens almost automatically, in a seemingly intuitive way with few additional keystrokes.
+% \end{macro}
+% \clearpage
+%
+% \noindent{\large\bfseries Core Indexing Operations}
+% \begin{macro}{\@nameauth@Actual}
+% This sets the ``actual'' character used by \textsf{nameauth} for index sorting.
+% \begin{macrocode}
+\newcommand*\@nameauth@Actual{@}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Index}
@@ -2574,7 +3091,8 @@ Running "make install" installs the files in the local TeX tree.
}
% \end{macrocode}
% \end{macro}
-% \clearpage
+%
+% \noindent{\large\bfseries Core Name Management Engine}
% \begin{macro}{\@nameauth@Name}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.96}{2012/02/19}{Works w/ \textsf{microtype}, \textsf{memoir}}
@@ -2582,15 +3100,24 @@ Running "make install" installs the files in the local TeX tree.
% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.3}{2016/01/05}{Rename as internal macro}
+% \changes{v2.4}{2016/03/15}{Define name CS after formatting; add token regs for hooks}
+% \changes{v2.41}{2016/03/17}{no local \cmd{\newtoks}}
% 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*\@nameauth@Name[3][1=\@empty, 3=\@empty]%
{%
+% \end{macrocode}
+% Prevent entering \cmd{\@nameauth@Name} via itself or \cmd{\AKA}. Both \cmd{\@nameauth@Name} and \cmd{\AKA} engage the lock. Calling these macros in their own parameters will create malformed output but should not halt program execution or overflow the stack. Calling these macros within the hook macros will simply cause them to exit.
+% \begin{macrocode}
+ \if@nameauth@Lock\else
+ \@nameauth@Locktrue%
+ \@nameauth@InNametrue%
\let\ex\expandafter%
- \leavevmode\hbox{}%
% \end{macrocode}
-% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions
+% \clearpage\noindent
+% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions. We also make token register copies of the current name args to be available for the hook macros.
% \begin{macrocode}
+ \leavevmode\hbox{}%
\protected@edef\testa{#1}%
\protected@edef\arga{\trim@spaces{#1}}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -2600,6 +3127,9 @@ Running "make install" installs the files in the local TeX tree.
\def\csb{\@nameauth@Clean{#2}}%
\def\csbc{\@nameauth@Clean{#2#3}}%
\def\csab{\@nameauth@Clean{#1!#2}}%
+ \@nameauth@toksa\expandafter{#1}%
+ \@nameauth@toksb\expandafter{#2}%
+ \@nameauth@toksc\expandafter{#3}%
% \end{macrocode}
% Test for malformed input.
% \begin{macrocode}
@@ -2731,12 +3261,12 @@ Running "make install" installs the files in the local TeX tree.
\@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\csb!MN}{}%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
\ex\@nameauth@FmtName\ex{\SNN}%
\fi
+ \csgdef{\csb!MN}{}%
\fi
\else
% \end{macrocode}
@@ -2764,17 +3294,16 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\csb!NF}{}%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
\ex\@nameauth@FmtName\ex{\SNN}%
\fi
+ \csgdef{\csb!NF}{}%
\fi
\fi
\else
% \end{macrocode}
-% \clearpage\noindent
% 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
@@ -2784,6 +3313,7 @@ Running "make install" installs the files in the local TeX tree.
\@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
@@ -2813,12 +3343,12 @@ Running "make install" installs the files in the local TeX tree.
\@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \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
+ \csgdef{\csbc!MN}{}%
\fi
\else
% \end{macrocode}
@@ -2850,12 +3380,12 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \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
+ \csgdef{\csbc!NF}{}%
\fi
\fi
\fi
@@ -2912,12 +3442,12 @@ Running "make install" installs the files in the local TeX tree.
\@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \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
+ \csgdef{\csab!MN}{}%
\fi
\else
% \end{macrocode}
@@ -2945,12 +3475,12 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \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
+ \csgdef{\csab!NF}{}%
\fi
\fi
\fi
@@ -2958,6 +3488,8 @@ Running "make install" installs the files in the local TeX tree.
% \clearpage\noindent
% Reset all the ``per name'' Boolean values.
% \begin{macrocode}
+ \@nameauth@Lockfalse%
+ \@nameauth@InNamefalse%
\@nameauth@FirstFormatfalse%
\@nameauth@NBSPfalse%
\@nameauth@DoCapsfalse%
@@ -2967,27 +3499,36 @@ Running "make install" installs the files in the local TeX tree.
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
% \end{macrocode}
+% Close the ``locked'' branch.
+% \begin{macrocode}
+ \fi
+% \end{macrocode}
% Call the full stop detection.
% \begin{macrocode}
\if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
% \end{macrocode}
% \end{macro}
+%
% \subsection{User Interface Macros}
+%
+% \noindent{\large\bfseries Syntactic Formatting\,---\,Capitalization}
% \begin{macro}{\CapThis}
% \changes{v0.94}{2012/02/15}{Added}
-% Tells the root capping macro to cap an unaccented character.
+% Tells the root capping macro to cap an unaccented first character.
% \begin{macrocode}
\newcommand*{\CapThis}{\@nameauth@DoCapstrue}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\AccentCapThis}
% \changes{v2.1}{2015/11/24}{Added}
-% Tells the root capping macro to cap an accented Unicode character.
+% Tells the root capping macro to cap an accented first Unicode character.
% \begin{macrocode}
\newcommand*{\AccentCapThis}{\@nameauth@Accenttrue\@nameauth@DoCapstrue}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\CapName}
% \changes{v1.5}{2013/02/22}{Added}
% Capitalize entire name.
@@ -2995,6 +3536,24 @@ Running "make install" installs the files in the local TeX tree.
\newcommand*{\CapName}{\@nameauth@AllThistrue}
% \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}
+% \changes{v1.5}{2013/02/22}{Added}
+% Turn on global surname capitalization.
+% \begin{macrocode}
+\newcommand*{\AllCapsActive}{\@nameauth@AllCapstrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \noindent{\large\bfseries Syntactic Formatting\,---\,Reversing}
% \begin{macro}{\RevName}
% \changes{v1.5}{2013/02/22}{Added}
% Reverse name order.
@@ -3002,6 +3561,24 @@ Running "make install" installs the files in the local TeX tree.
\newcommand*{\RevName}{\@nameauth@RevThistrue}
% \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}
+%
+% \noindent{\large\bfseries Syntactic Formatting\,---\,Reversing with Commas}
% \begin{macro}{\RevComma}
% \changes{v1.5}{2013/02/22}{Added}
% Last name, comma, first name.
@@ -3010,6 +3587,26 @@ Running "make install" installs the files in the local TeX tree.
{\@nameauth@RevThistrue\@nameauth@RevThisCommatrue}
% \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}
+%
+% \noindent{\large\bfseries Syntactic Formatting\,---\,Affixes}
% \begin{macro}{\ShowComma}
% \changes{v1.4}{2012/07/24}{Added}
% Put comma between name and suffix one time.
@@ -3017,6 +3614,8 @@ Running "make install" installs the files in the local TeX tree.
\newcommand*{\ShowComma}{\@nameauth@ShowCommatrue}
% \end{macrocode}
% \end{macro}
+%
+% \noindent{\large\bfseries Typographic Formatting\,---\,Affixes}
% \begin{macro}{\KeepAffix}
% \changes{v1.9}{2015/07/09}{Added}
% Trigger a name-suffix pair to be separated by a non-breaking space.
@@ -3025,6 +3624,7 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
+% \noindent{\large\bfseries Typographic Formatting\,---\,Main Versus Front Matter}
% \begin{macro}{\NamesInactive}
% Switch to the ``non-formatted'' species of names.
% \begin{macrocode}
@@ -3039,56 +3639,26 @@ Running "make install" installs the files in the local TeX tree.
% \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}
+% \noindent{\large\bfseries Name Occurrence Tweaks}
+% \begin{macro}{\LocalNames}
+% \changes{v2.3}{2016/01/05}{Added}
+% \changes{v2.4}{2016/03/15}{Ensured to be global}
+% \cmd{\LocalNames} sets |@nameauth@LocalNames| true so \cmd{\ForgetName} and \cmd{\SubvertName} do not affect both formatted and unformatted names.
% \begin{macrocode}
-\newcommand*{\ReverseCommaInactive}%
- {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
+\newcommand*\LocalNames{\global\@nameauth@LocalNamestrue}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\ReverseCommaActive}
-% Turn on global ``last-name-comma-first.''
-% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macro}{\GlobalNames}
+% \changes{v2.3}{2016/01/05}{Added}
+% \changes{v2.4}{2016/03/15}{Ensured to be global}
+% \cmd{\GlobalNames} sets |@nameauth@LocalNames| false, restoring the default behavior of \cmd{\ForgetName} and \cmd{\SubvertName}.
% \begin{macrocode}
-\newcommand*{\ReverseCommaActive}%
- {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
+\newcommand*\GlobalNames{\global\@nameauth@LocalNamesfalse}
% \end{macrocode}
% \end{macro}
%
+% \noindent{\large\bfseries Index Operations}
% \begin{macro}{\IndexInactive}
% \changes{v0.94}{2012/02/15}{Added}
% turn off global indexing of names.
@@ -3114,22 +3684,8 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\LocalNames}
-% \changes{v2.3}{2016/01/05}{Added}
-% \cmd{\LocalNames} sets |@nameauth@LocalNames| true so \cmd{\ForgetName} and \cmd{\SubvertName} do not affect both formatted and unformatted names.
-% \begin{macrocode}
-\newcommand*\LocalNames{\@nameauth@LocalNamestrue}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\GlobalNames}
-% \changes{v2.3}{2016/01/05}{Added}
-% \cmd{\GlobalNames} sets |@nameauth@LocalNames| false, restoring the default behavior of \cmd{\ForgetName} and \cmd{\SubvertName}.
-% \begin{macrocode}
-\newcommand*\GlobalNames{\@nameauth@LocalNamesfalse}
-% \end{macrocode}
-% \end{macro}
-%
+% \clearpage
+% \noindent{\large\bfseries Main Naming Interface}
% \begin{macro}{\Name}
% \changes{v2.3}{2016/01/05}{Change to interface macro}
% \cmd{\Name} calls \cmd{\NameauthName,} the interface hook.
@@ -3162,7 +3718,8 @@ Running "make install" installs the files in the local TeX tree.
\WithSuffix\def\FName*{\@nameauth@FirstNametrue\NameauthFName}
% \end{macrocode}
% \end{macro}
-% \clearpage\noindent
+%
+% \noindent{\large\bfseries Alternate Names}
% \begin{macro}{\AKA}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.9}{2012/02/10}{Add starred mode; redesigned}
@@ -3171,21 +3728,30 @@ Running "make install" installs the files in the local TeX tree.
% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.3}{2016/01/05}{Expand starred mode}
+% \changes{v2.4}{2016/03/15}{Define name CS after formatting; add token regs for hooks}
+% \changes{v2.41}{2016/03/17}{no local \cmd{\newtoks}}
% \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]%
{%
+% \end{macrocode}
+% Prevent entering \cmd{\AKA} via itself or \cmd{\@nameauth@Name}.
+% \begin{macrocode}
+ \if@nameauth@Lock\else
+ \@nameauth@Locktrue%
+ \@nameauth@InAKAtrue%
\let\ex\expandafter%
- \leavevmode\hbox{}%
% \end{macrocode}
-% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions.
+% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions. We also make token register copies of the current name args to be available for use within the hook macros.
% \begin{macrocode}
+ \leavevmode\hbox{}%
\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\argd{\trim@spaces{#3}}%
\protected@edef\testd{\trim@spaces{#4}}%
\protected@edef\testdr{\@nameauth@Root{#4}}%
\protected@edef\teste{#5}%
@@ -3193,7 +3759,11 @@ Running "make install" installs the files in the local TeX tree.
\def\csd{\@nameauth@Clean{#4}}%
\def\csde{\@nameauth@Clean{#4#5}}%
\def\cscd{\@nameauth@Clean{#3!#4}}%
+ \@nameauth@toksa\expandafter{#3}%
+ \@nameauth@toksb\expandafter{#4}%
+ \@nameauth@toksc\expandafter{#5}%
% \end{macrocode}
+% \clearpage\noindent
% Test for malformed input.
% \begin{macrocode}
\ifx\testb\@empty
@@ -3221,7 +3791,6 @@ Running "make install" installs the files in the local TeX tree.
\if@nameauth@RevAll\@nameauth@RevThistrue\fi
\if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
% \end{macrocode}
-% \clearpage\noindent
% 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}%
@@ -3238,6 +3807,8 @@ Running "make install" installs the files in the local TeX tree.
\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}}%
@@ -3268,9 +3839,6 @@ Running "make install" installs the files in the local TeX tree.
\let\SNNd\AllCapShort%
\let\Reversed\AllCapShort%
\fi
-% \end{macrocode}
-% \clearpage
-% \begin{macrocode}
\else
\protected@edef\Suffd{\@nameauth@Suffix{#4}}%
\protected@edef\ISNNd{\Shortd\ISpace\Suffd}%
@@ -3286,6 +3854,7 @@ Running "make install" installs the files in the local TeX tree.
\fi
\fi
% \end{macrocode}
+% \clearpage\noindent
% Here we parse names.
% \begin{macrocode}
\ifx\testc\@empty
@@ -3305,7 +3874,6 @@ Running "make install" installs the files in the local TeX tree.
\PackageWarning{nameauth}%
{macro \AKA: Name reference: #4 exists; no xref}%
\else
- \csgdef{\csd!PN}{}%
\ifx\testa\@empty
\@nameauth@Index{\csd}%
{\ISNNd|see{\SNNb}}%
@@ -3322,7 +3890,7 @@ Running "make install" installs the files in the local TeX tree.
\fi
\fi
% \end{macrocode}
-% \clearpage\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.
+% 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}%
@@ -3336,8 +3904,10 @@ Running "make install" installs the files in the local TeX tree.
\else
\ex\@nameauth@FmtName\ex{\SNNd}%
\fi
+ \ifcsname\csd!PN\endcsname\else\csgdef{\csd!PN}{}\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
@@ -3352,7 +3922,6 @@ Running "make install" installs the files in the local TeX tree.
\PackageWarning{nameauth}%
{macro \AKA: Name reference: #4 #5 exists; no xref}%
\else
- \csgdef{\csde!PN}{}%
\ifx\testa\@empty
\@nameauth@Index{\csde}%
{\ISNNd\ISpace\arge|see{\SNNb}}%
@@ -3369,7 +3938,7 @@ Running "make install" installs the files in the local TeX tree.
\fi
\fi
% \end{macrocode}
-% \clearpage\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.
+% 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}%
@@ -3387,9 +3956,11 @@ Running "make install" installs the files in the local TeX tree.
\ex\@nameauth@FmtName\ex{\ex\SNNd\ex\space\arge}%
\fi
\fi
+ \ifcsname\csde!PN\endcsname\else\csgdef{\csde!PN}{}\fi
\fi
\else
% \end{macrocode}
+% \clearpage\noindent
% 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
@@ -3404,7 +3975,6 @@ Running "make install" installs the files in the local TeX tree.
\PackageWarning{nameauth}%
{macro \AKA: Name reference: #3 #4 exists; no xref}%
\else
- \csgdef{\cscd!PN}{}%
\ifx\testa\@empty
\ifx\Suffd\@empty
\@nameauth@Index{\cscd}%
@@ -3436,7 +4006,8 @@ Running "make install" installs the files in the local TeX tree.
\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.
+% \clearpage\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}%
@@ -3457,10 +4028,14 @@ Running "make install" installs the files in the local TeX tree.
\ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNNd}%
\fi
\fi
+ \ifcsname\cscd!PN\endcsname\else\csgdef{\cscd!PN}{}\fi
\fi
% \end{macrocode}
% Reset all the ``per name'' Boolean values.
% \begin{macrocode}
+ \@nameauth@Lockfalse%
+ \@nameauth@InAKAfalse%
+ \@nameauth@FirstFormatfalse%
\@nameauth@NBSPfalse%
\@nameauth@AltAKAfalse%
\@nameauth@DoCapsfalse%
@@ -3470,6 +4045,10 @@ Running "make install" installs the files in the local TeX tree.
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
% \end{macrocode}
+% Close the ``locked'' branch.
+% \begin{macrocode}
+ \fi
+% \end{macrocode}
% Call the full stop detection.
% \begin{macrocode}
\if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
@@ -3484,7 +4063,6 @@ Running "make install" installs the files in the local TeX tree.
\WithSuffix\def\AKA*{\@nameauth@AltAKAtrue\AKA}
% \end{macrocode}
% \end{macro}
-% \clearpage\noindent
%
% \begin{macro}{\PName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
@@ -3506,13 +4084,12 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\TagName}
-% \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}.
+% \noindent{\large\bfseries Name Info Database: ``Text Tags''}
+% \begin{macro}{\NameAddInfo}
+% \changes{v2.4}{2016/03/15}{Added}
+% This creates a control sequence and information associated with a given name, similar to an index tag, but usable in the body text.
% \begin{macrocode}
-\newcommandx*\TagName[4][1=\@empty, 3=\@empty]%
+\newcommandx\NameAddInfo[4][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3525,49 +4102,31 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\ifx\testb\@empty
\PackageError{nameauth}%
- {macro \TagName: Essential name missing}%
+ {macro \NameInfo: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \TagName: Essential name malformed}%
+ {macro \NameInfo: 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
+ \csgdef{\csb!DB}{#4}%
\else
- \ifcsname\csbc!PN\endcsname
- \PackageWarning{nameauth}%
- {macro \TagName: not tagging xref: #2 #3}%
- \else
- \csgdef{\csbc!TAG}{#4}%
- \fi
+ \csgdef{\csbc!DB}{#4}%
\fi
\else
- \ifcsname\csab!PN\endcsname
- \PackageWarning{nameauth}%
- {macro \TagName: not tagging xref: #1 #2}%
- \else
- \csgdef{\csab!TAG}{#4}%
- \fi
+ \csgdef{\csab!DB}{#4}%
\fi
}
% \end{macrocode}
% \end{macro}
-% \clearpage\noindent
%
-% \begin{macro}{\UntagName}
-% \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{macro}{\NameQueryInfo}
+% \changes{v2.4}{2016/03/15}{Added}
+% This prints the information created by \cmd{\NameAddInfo} if it exists.
% \begin{macrocode}
-\newcommandx*\UntagName[3][1=\@empty, 3=\@empty]%
+\newcommandx\NameQueryInfo[3][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3576,36 +4135,36 @@ Running "make install" installs the files in the local TeX tree.
\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.
+% \clearpage\noindent
+% 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 \UntagName: Essential name missing}%
+ {macro \NameInfo: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \UntagName: Essential name malformed}%
+ {macro \NameInfo: Essential name malformed}%
\fi
\fi
\ifx\testa\@empty
\ifx\testc\@empty
- \global\csundef{\csb!TAG}%
+ \ifcsname\csb!DB\endcsname\csname\csb!DB\endcsname\fi
\else
- \global\csundef{\csbc!TAG}%
+ \ifcsname\csbc!DB\endcsname\csname\csbc!DB\endcsname\fi
\fi
\else
- \global\csundef{\csab!TAG}%
+ \ifcsname\csab!DB\endcsname\csname\csab!DB\endcsname\fi
\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{macro}{\NameClearInfo}
+% \changes{v2.4}{2016/03/15}{Added}
+% This deletes a text tag. It has the same structure as \cmd{\UntagName.}
% \begin{macrocode}
-\newcommandx*\PretagName[4][1=\@empty, 3=\@empty]%
+\newcommandx*\NameClearInfo[3][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3614,43 +4173,32 @@ Running "make install" installs the files in the local TeX tree.
\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.
+% 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 \TagName: Essential name missing}%
+ {macro \UntagName: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \TagName: Essential name malformed}%
+ {macro \UntagName: 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
+ \global\csundef{\csb!DB}%
\else
- \ifcsname\csbc!PN\endcsname
- \PackageWarning{nameauth}%
- {macro \PretagName: tagging xref: #2 #3}%
- \fi
- \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi
+ \global\csundef{\csbc!DB}%
\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
+ \global\csundef{\csab!DB}%
\fi
}
% \end{macrocode}
% \end{macro}
% \clearpage\noindent
%
+% \noindent{\large\bfseries Index Operations}
% \begin{macro}{\IndexName}
% \changes{v0.75}{2012/01/19}{Use current arguments}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
@@ -3736,6 +4284,151 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
+% \clearpage\noindent
+% \begin{macro}{\TagName}
+% \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]%
+{%
+ \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 \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
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \clearpage\noindent
+% \begin{macro}{\UntagName}
+% \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 tag.
+% \begin{macrocode}
+\newcommandx*\UntagName[3][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, 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}
+%
% \begin{macro}{\ExcludeName}
% \changes{v0.94}{2012/02/15}{Added}
% \changes{v2.0}{2015/11/11}{Isolate malformed input}
@@ -3751,6 +4444,7 @@ Running "make install" installs the files in the local TeX tree.
\def\csbc{\@nameauth@Clean{#2#3}}%
\def\csab{\@nameauth@Clean{#1!#2}}%
% \end{macrocode}
+% \clearpage\noindent
% 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
@@ -3798,6 +4492,9 @@ Running "make install" installs the files in the local TeX tree.
\fi
\fi
\fi
+% \end{macrocode}
+% \clearpage\noindent
+% \begin{macrocode}
\else
\ifcsname\csab!PN\endcsname
\PackageWarning{nameauth}%
@@ -3820,11 +4517,12 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfAKA}
+% \noindent{\large\bfseries Name Decisions}
+% \begin{macro}{\IfFrontName}
% \changes{v2.3}{2016/01/05}{Added}
-% This macro expands one path if a see-reference name exists, another if it does not exist, and a third if it is excluded.
+% This macro expands one path if a front matter name exists, or else the other if it does not exist.
% \begin{macrocode}
-\newcommandx\IfAKA[6][1=\@empty, 3=\@empty]%
+\newcommandx\IfFrontName[5][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3837,37 +4535,32 @@ Running "make install" installs the files in the local TeX tree.
% \begin{macrocode}
\ifx\testb\@empty
\PackageError{nameauth}%
- {macro \ExcludeName: Essential name missing}%
+ {macro \IfFrontName: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \ExcludeName: Essential name malformed}%
+ {macro \IfFrontName: Essential name malformed}%
\fi
\fi
\ifx\testa\@empty
\ifx\testc\@empty
- \ifcsname\csb!PN\endcsname
- \ifcsempty{\csb!PN}{#4}{#6}%
- \else#5\fi
+ \ifcsname\csb!NF\endcsname{#4}\else{#5}\fi
\else
- \ifcsname\csbc!PN\endcsname
- \ifcsempty{\csbc!PN}{#4}{#6}%
- \else#5\fi
+ \ifcsname\csbc!NF\endcsname{#4}\else{#5}\fi
\fi
\else
- \ifcsname\csab!PN\endcsname
- \ifcsempty{\csab!PN}{#4}{#6}%
- \else#5\fi
+ \ifcsname\csab!NF\endcsname{#4}\else{#5}\fi
\fi
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfFrontName}
+% \clearpage\noindent
+% \begin{macro}{\IfMainName}
% \changes{v2.3}{2016/01/05}{Added}
-% This macro expands one path if a front matter name exists, or else the other if it does not exist.
+% This macro expands one path if a main matter name exists, or else the other if it does not exist.
% \begin{macrocode}
-\newcommandx\IfFrontName[5][1=\@empty, 3=\@empty]%
+\newcommandx\IfMainName[5][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3876,36 +4569,37 @@ Running "make install" installs the files in the local TeX tree.
\def\csbc{\@nameauth@Clean{#2#3}}%
\def\csab{\@nameauth@Clean{#1!#2}}%
% \end{macrocode}
-% \clearpage\noindent
% 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}%
+ {macro \IfMainName: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \ExcludeName: Essential name malformed}%
+ {macro \IfMainName: Essential name malformed}%
\fi
\fi
\ifx\testa\@empty
\ifx\testc\@empty
- \ifcsname\csb!NF\endcsname#4\else#5\fi
+ \ifcsname\csb!MN\endcsname{#4}\else{#5}\fi
\else
- \ifcsname\csbc!NF\endcsname#4\else#5\fi
+ \ifcsname\csbc!MN\endcsname{#4}\else{#5}\fi
\fi
\else
- \ifcsname\csab!NF\endcsname#4\else#5\fi
+ \ifcsname\csab!MN\endcsname{#4}\else{#5}\fi
\fi
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfMainName}
+% \clearpage\noindent
+% \begin{macro}{\IfAKA}
% \changes{v2.3}{2016/01/05}{Added}
-% This macro expands one path if a main matter name exists, or else the other if it does not exist.
+% \changes{v2.4}{2016/03/15}{Redesign exclusion test}
+% This macro expands one path if a see-reference name exists, another if it does not exist, and a third if it is excluded.
% \begin{macrocode}
-\newcommandx\IfMainName[5][1=\@empty, 3=\@empty]%
+\newcommandx\IfAKA[6][1=\@empty, 3=\@empty]%
{%
\protected@edef\testa{#1}%
\protected@edef\testb{\trim@spaces{#2}}%
@@ -3913,31 +4607,43 @@ Running "make install" installs the files in the local TeX tree.
\def\csb{\@nameauth@Clean{#2}}%
\def\csbc{\@nameauth@Clean{#2#3}}%
\def\csab{\@nameauth@Clean{#1!#2}}%
+ \def\test{!}%
% \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}%
+ {macro \IfAKA: Essential name missing}%
\else
\ifx\csb\@empty
\PackageError{nameauth}%
- {macro \ExcludeName: Essential name malformed}%
+ {macro \IfAKA: Essential name malformed}%
\fi
\fi
\ifx\testa\@empty
\ifx\testc\@empty
- \ifcsname\csb!MN\endcsname#4\else#5\fi
+ \ifcsname\csb!PN\endcsname
+ \edef\testa{\csname\csb!PN\endcsname}%
+ \ifx\testa\test{#6}\else{#4}\fi
+ \else{#5}\fi
\else
- \ifcsname\csbc!MN\endcsname#4\else#5\fi
+ \ifcsname\csbc!PN\endcsname
+ \edef\testa{\csname\csbc!PN\endcsname}%
+ \ifx\testa\test{#6}\else{#4}\fi
+ \else{#5}\fi
\fi
\else
- \ifcsname\csab!MN\endcsname#4\else#5\fi
+ \ifcsname\csab!PN\endcsname
+ \edef\testa{\csname\csab!PN\endcsname}%
+ \ifx\testa\test{#6}\else{#4}\fi
+ \else{#5}\fi
\fi
}
% \end{macrocode}
% \end{macro}
%
+% \clearpage\noindent
+% \noindent{\large\bfseries Changing Name Decisions}
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New argument added}
% \changes{v1.9}{2015/07/09}{Ensure global undef}
@@ -4082,93 +4788,99 @@ Running "make install" installs the files in the local TeX tree.
% \end{macrocode}
% \end{macro}
%
+% \noindent{\large\bfseries Simplified Interface}
% \begin{environment}{nameauth}
% \changes{v1.6}{2013/03/10}{Added}
% \changes{v2.0}{2015/11/11}{Redesigned argument handling}
% \changes{v2.11}{2015/11/29}{Bugfix}
+% \changes{v2.41}{2016/03/17}{no local \cmd{\newtoks}}
% 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\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
+ \protected@edef\@arga{\trim@spaces{##1}}%
+ \protected@edef\@testb{\trim@spaces{##2}}%
+ \protected@edef\@testc{\trim@spaces{##3}}%
+ \protected@edef\@testd{\trim@spaces{##4}}%
+ \@nameauth@etoksb\expandafter{##2}%
+ \@nameauth@etoksc\expandafter{##3}%
+ \@nameauth@etoksd\expandafter{##4}%
+ \ifx\@arga\@empty
\PackageError{nameauth}%
{environment nameauth: Control sequence missing}%
\else
- \ifx\testc\@empty
+ \ifx\@testc\@empty
\PackageError{nameauth}%
{environment nameauth: Essential name missing}%
\else
- \ifcsname\arga\endcsname
+ \ifcsname\@arga\endcsname
\PackageWarning{nameauth}%
{environment nameauth: Redefinition of shorthands}%
\fi
- \ifx\testd\@empty
- \ifx\testb\@empty
- \ex\csgdef\ex{\ex\arga\ex}\ex{\ex\NameauthName\ex{\the\tokc}}%
- \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\@nameauth@FullNametrue%
- \ex\NameauthLName\ex{\the\tokc}}%
- \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\@nameauth@FirstNametrue%
- \ex\NameauthFName\ex{\the\tokc}}%
+ \ifx\@testd\@empty
+ \ifx\@testb\@empty
+ \ex\csgdef\ex{\ex\@arga\ex}\ex{\ex\NameauthName\ex{%
+ \the\@nameauth@etoksc}}%
+ \ex\csgdef\ex{\ex L\ex\@arga\ex}\ex{%
+ \ex\@nameauth@FullNametrue%
+ \ex\NameauthLName\ex{\the\@nameauth@etoksc}}%
+ \ex\csgdef\ex{\ex S\ex\@arga\ex}\ex{%
+ \ex\@nameauth@FirstNametrue%
+ \ex\NameauthFName\ex{\the\@nameauth@etoksc}}%
% \end{macrocode}
% \clearpage\noindent
% \begin{macrocode}
\else
- \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
- \ex\ex\ex{\ex\ex\ex\NameauthName\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\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex[%
+ \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga%
\ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
- \ex\ex\ex\NameauthLName\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\NameauthLName\ex\ex\ex[%
+ \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga%
\ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
\ex\ex\ex\NameauthFName\ex\ex\ex[%
- \ex\the\ex\tokb\ex]\ex{\the\tokc}}%
+ \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
\fi
\else
- \ifx\testb\@empty
- \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
- \ex\ex\ex{\ex\ex\ex\NameauthName\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%
+ \ifx\@testb\@empty
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex{%
+ \ex\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga%
\ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
\ex\ex\ex\NameauthLName\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\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga%
\ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
\ex\ex\ex\NameauthFName\ex\ex\ex{%
- \ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
\else
\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\@arga\ex\ex\ex\ex\ex\ex\ex}%
\ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\NameauthName%
- \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[\ex\ex\ex\the\ex\ex\ex\@nameauth@etoksb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
+ \the\@nameauth@etoksd]}%
\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 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\@nameauth@FullNametrue%
- \ex\ex\ex\ex\ex\ex\ex\NameauthLName%
- \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\NameauthLName\ex\ex\ex\ex\ex\ex\ex[%
+ \ex\ex\ex\the\ex\ex\ex\@nameauth@etoksb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
+ \the\@nameauth@etoksd]}%
\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 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\@nameauth@FirstNametrue%
\ex\ex\ex\ex\ex\ex\ex\NameauthFName\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\the\ex\ex\ex\@nameauth@etoksb\ex\ex\ex]%
+ \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
+ \the\@nameauth@etoksd]}%
\fi
\fi
\fi