diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/nameauth.pdf | bin | 642510 -> 645567 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/nameauth/nameauth.dtx | 486 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/nameauth/nameauth.sty | 122 |
4 files changed, 335 insertions, 275 deletions
diff --git a/Master/texmf-dist/doc/latex/nameauth/README b/Master/texmf-dist/doc/latex/nameauth/README index 3b009698461..1dc71374493 100644 --- a/Master/texmf-dist/doc/latex/nameauth/README +++ b/Master/texmf-dist/doc/latex/nameauth/README @@ -1,7 +1,7 @@ The nameauth package Charles P. Schaum charles dot schaum at att dot net -v0.95 from 2012/02/17 +v0.96 from 2012/02/19 Abstract diff --git a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf Binary files differindex 9941149f7fd..2b92784e028 100644 --- a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf +++ b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx index 7ec95e9f1a9..0cbb8318571 100644 --- a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx +++ b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx @@ -26,7 +26,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesPackage{nameauth} %<*package> - [2012/02/17 v0.95 name authority macros to aid consistent display and indexing of names] + [2012/02/19 v0.96 name authority macros to aid consistent display and indexing of names] %</package> % %<*driver> @@ -47,17 +47,12 @@ \usepackage[utf8]{inputenc} \usepackage[TS1,T1]{fontenc} \usepackage{lmodern} -\usepackage{newunicodechar} -\DeclareTextSymbolDefault{\textlongs}{TS1} -\DeclareTextSymbol{\textlongs}{TS1}{115} -\newunicodechar{ſ}{\textlongs} -\newunicodechar{ā}{\=a} -\newunicodechar{ṃ}{\d{m}} \fi \fi \usepackage{makeidx} -\usepackage{nameauth}[2012/02/17] -\usepackage{hyperref} +\usepackage{multicol} +\usepackage{nameauth}[2012/02/19] +\usepackage[colorlinks=true,linkcolor=blue]{hyperref} \begingroup\lccode`!=`\\\lowercase{\endgroup\def\bsc{!}} \makeindex \frenchspacing @@ -72,7 +67,7 @@ %</driver> % \fi % -% \CheckSum{920} +% \CheckSum{928} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -100,8 +95,9 @@ % \changes{v0.92}{2012/02/12}{Build with all major \LaTeX{} engines} % \changes{v0.94}{2012/02/15}{Added index suppression, error checking, better particle handling} % \changes{v0.95}{2012/02/17}{Fixed occasional incompatibility with \textsf{microtype}.} +% \changes{v0.96}{2012/02/19}{Defined compatibility limits with \textsf{microtype} and \textsf{memoir}.} % -% \DoNotIndex{\newcommand, \newenvironment, \@empty, \@gobble, \bfseries, \bgroup, \def, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \fi, \if, \ifx, \IfBooleanTF, \IfValueTF, \itshape, \let, \newif, \relax, \renewcommand, \RequirePackage, \scshape, \space, \DeclareDocumentCommand, \DeclareOption, \ProcessOptions, \@token, \@period, \csgdef, \csundef, \detokenize, \expandafter, \Forenames, \futurelet, \if@nameauth@DoComma, \if@nameauth@DoFormat, \if@nameauth@Punct, \ifcsname, \index, \PackageWarning, \Surnames, \Surnamesi, \Surnamesii, \TestDot, \TestEnd, \TestPunct, \TestStop, \zap@space, \edef, \if@nameauth@DoIndex, \if@nameauth@Comma, \Test, \bsc, \uppercase, \Input, \Output, \if@nameauth@DoCaps, \Cap, \@Cap} +% \DoNotIndex{\newcommand, \newenvironment, \@empty, \@gobble, \bfseries, \bgroup, \def, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \fi, \if, \ifx, \IfBooleanTF, \IfValueTF, \itshape, \let, \newif, \relax, \renewcommand, \RequirePackage, \scshape, \space, \DeclareDocumentCommand, \DeclareOption, \ProcessOptions, \@token, \@period, \csgdef, \csundef, \detokenize, \expandafter, \Forenames, \futurelet, \if@nameauth@DoComma, \if@nameauth@DoFormat, \if@nameauth@Punct, \ifcsname, \index, \PackageWarning, \Surnames, \Surnamesi, \Surnamesii, \TestDot, \TestEnd, \TestPunct, \TestStop, \zap@space, \edef, \if@nameauth@DoIndex, \if@nameauth@Comma, \Test, \bsc, \uppercase, \Input, \Output, \if@nameauth@DoCaps, \Cap, \@Cap, \ISurnames, \Shortnames} % % \providecommand*{\url}{\texttt} % \GetFileInfo{nameauth.dtx} @@ -120,7 +116,7 @@ % % \subsection{Typesetting, Indexing, and Design} % -% This package has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}, as well as \textsf{makeindex} and \textsf{texindy}. This file was typeset with \ifxetex\textsf{xelatex}\else\ifluatex\ifpdf\textsf{lualatex} in \texttt{pdf} mode\else\textsf{lualatex} in \texttt{dvi} mode\fi\else\ifpdf\textsf{pdflatex}\else\textsf{latex}\fi\fi\fi{} and \textsf{makeindex}. It will work with the other engines too. No compatibility issues have emerged. The default options and design of this package try to minimize keystrokes or trade extra work for benefits in formatting and consistency. The \texttt{.dtx} file is a good source of information on how many variations of the macros can be used. +% This package depends on \textsf{etoolbox} and \textsf{xparse.} It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}, as well as \textsf{makeindex} and \textsf{texindy}. This file was typeset with \ifxetex\textsf{xelatex}\else\ifluatex\ifpdf\textsf{lualatex} in \texttt{pdf} mode\else\textsf{lualatex} in \texttt{dvi} mode\fi\else\ifpdf\textsf{pdflatex}\else\textsf{latex}\fi\fi\fi{} and \textsf{makeindex}. Section \ref{sec:accents} discusses infrequent cases of incompatibility with \textsf{microtype} when using \textsf{memoir}. The default options and design of this package try to minimize keystrokes or trade extra work for benefits in formatting and consistency. The \texttt{.dtx} file is also a good source of information. % % \subsection{Thanks} % @@ -148,13 +144,13 @@ % \clearpage % % \subsection{Example Text} +% \label{sec:example} % % We begin with a sample text that attempts to cover the basic features, and even a couple of advanced ones. It is in the genre of a merry wedding reception toast, proving that a serious package can be used lightheartedly.\\ % % \noindent DISCLAIMER: I use a number of names associated with historical figures throughout this document. This is because I expect that the users of this package will refer to real-world figures. At no time in this document am I intending either to promote, disparage, align with, align against, or make any assertions about any persons living or dead. As far as I am concerned, all names mentioned herein deserve respect for the impact and legacy of their bearers.\\ % % \noindent\textbf{Example Text:} -% \label{sec:example} % % {\small\ttfamily This is a toast to |\Name[John]{Smith}| and his longtime sweetheart,\break |\Name[J.Q.]{Public}[Jane Q.]|. |\FName[John]{Smith}| and\break |``\FName[J.Q.]{Public}[Janie]''| have finally made it official today! After\break casual dating as teenagers, they met again in college where they learned\break about |\Name{Aristotle}| and all the stuff that I can't keep in my head.\break [laughs] Nevertheless, by the time they got to |\Name{John}[Duns Scotus]| they were definitely a number. They studied medieval history-makers like\break |\Name{Gregory, I}| |``\AKA*{Gregory, I}{Gregory}[the Great]''| and by the\break Renaissance they were engaged. After spending time in separate grad schools, these promising medievalists got faculty positions at adjoining colleges\break and here we are. As the brother of |\FName[J.Q.]{Public}[Jane]|\break |``\AKA*[J.Q.]{Public}{Jane}[the Great]''| I am happy to welcome\break |\FName[John]{Smith}[Sir John]| to our raucous family.}\\ % @@ -163,86 +159,164 @@ % Here you will notice that one can make a reference to Pope |\Name{Gregory, I}| followed by ``the Great'' via |``\AKA*{Gregory, I}{Gregory}[the Great]''|. That is achieved by the ambiguous behavior of the default \texttt{nocomma} option plus the ``sobriquet only'' feature of \cmd{\AKA*}. It is easy to use these features, but can be tricky to debug. Sections \ref{sec:suffix} and \ref{sec:pennames} have more details. % % \subsection{Quick Start Guide} +% \label{sec:start} % \changes{v0.8}{2012/01/29}{Added quick start guide} % \changes{v0.85}{2012/02/05}{Updated quick start guide} +% \changes{v0.96}{2012/02/19}{Redesigned guide for better readability.} % -% This page and the next comprise a ``cheat sheet'' for the impatient. None of the examples in this subsection generate index entries. These examples help you get used to the package, but they do not show all possibilities. +% This ``cheat sheet'' engages about 80\% of the features in this package. % +% \begin{multicols}{2}\small +% \subsubsection{Rules of Thumb} % \begin{enumerate}\setlength\itemsep{0pt}\small -% \item The indexed forms of the names always remain the same. -% \item Always use the same form of reference, e.g., |\Name[John]{Smith}| or\newline |\Name{Louis}[XIV]|, otherwise point 1 will become false. +% \item \cmd{\frenchspacing} is recommended. +% \item The indexed forms of the names remain the same if you follow the macro input charts consistently. +% \item Problematic index entries often lead to correctable mistakes. % \item Trade work for consistency. -% \item Checking index references will help you find mistakes. -% \item Start using the macros you \emph{need}, then work from there. +% \item Use just the macros you \emph{need}. % \end{enumerate} -% -% \bgroup\small -% \begin{tabular}{p{1.8in}p{2.3in}} -% \normalsize\strut\textbf{I want to\dots} & \normalsize\textbf{I need to use} (for example)\dots \\\hline -% Print a full Western name (first reference in the text) & |\Name*[John]{Smith}| or\newline |\Name[John]{Smith}| or\newline |\FName[John]{Smith}|\\\hline -% Full Western name & |\Name*[John]{Smith}|\\\hline -% Short surname only (later) & |\Name[John]{Smith}|\\\hline -% First name only (later) & |\FName[John]{Smith}|\\\hline -% Print name with alternate forenames/nicknames in the text, not in the index (first reference) & |\Name*[J.Q.]{Public}[Jane Q.]| or\newline |\Name[J.Q.]{Public}[Jane Q.]| or\newline |\FName[J.Q.]{Public}[Jane Q.]|\\\hline -% Nickname only (later) & |\FName[J.Q.]{Public}[Jane Q.]|\\\hline -% Full name without longer form & |\Name*[J.Q.]{Public}|\\\hline -% Same person, last name only (subsequent reference) & |\Name[J.Q.]{Public}[Jane Q.]| or\newline \dag|\Name[J.Q.]{Public}|\\\hline -% Print an ancient name & |\Name{Plato}| or |\Name*{Plato}|\\\hline -% Print a full Eastern name (first reference) & |\Name*{Mao}[Tse-tung]| or\newline |\Name{Mao}[Tse-tung]|\\\hline -% Full Eastern name & |\Name*{Mao}[Tse-tung]|\\\hline -% Short name (later reference) & |\Name{Mao}[Tse-tung]|\\\hline -% Print a full ``royal'' name (first reference) & |\Name*{Louis}[XIV]| or\newline |\Name{Louis}[XIV]|\\\hline -% Full ``royal'' name & |\Name*{Louis}[XIV]|\\\hline -% Shorter subsequent reference & |\Name{Louis}[XIV]|\\\hline -% Ancient name and sobriquet & |\Name*{Antiochus V}[Eupator]| or\newline |\Name{Antiochus V}[Eupator]|\\\hline -% Shorter subsequent reference & |\Name{Antiochus V}[Eupator]|\\\hline -% \end{tabular} -% -% \smallskip\dag{} This form is OK, but can cause unwanted results if you rearrange text.\medskip -% \egroup -% -% \noindent I strongly suggest reading Section \ref{sec:suffix} before using comma-delimited suffixes. -% \clearpage -% -% \bgroup\small -% \begin{tabular}{p{1.6in}p{2.5in}} -% \normalsize\strut\textbf{I want to\dots} & \normalsize\textbf{I need to use} (for example)\dots \\\hline -% Only index, not print a reference to ``Public, J.Q.'' & |\IndexName[J.Q.]{Public}| or\newline \dag|\IndexName[J.Q.]{Public}[Jane Q.]|\\\hline -% Only index, not print a reference to ``Plato'' & |\IndexName{Plato}|\\\hline -% Only index, not print a reference to ``Mao Tse-tung'' & \ddag|\IndexName{Mao}[Tse-tung]|\\\hline -% Only index, not print a reference to ``Louis XIV'' & \ddag|\IndexName{Louis}[XIV]|\\\hline -% Only index, a reference to ``Antiochus V Eupator'' & \ddag|\IndexName{Antiochus V}[Eupator]|\\\hline -% \end{tabular} -% -% \smallskip\dag{} The alternate names are ignored in this case.\\ -% \indent\ddag{} Ambiguous variants are not shown. \emph{Caveat auctor}. -% \egroup -% -%\bigskip -% \bgroup\small -% \begin{tabular}{p{1.5in}p{2.6in}} -% \normalsize\strut\textbf{I want to\dots} & \normalsize\textbf{I need to use} (for example)\dots \\\hline -% Print a name that is only a \emph{see} reference to another. & |\AKA[Bob]{Hope}[Leslie Townes]{Hope}|\\\hline -% Print both names, the latter in parens & |\PName[Bob]{Hope}[Leslie Townes]{Hope}|\\\hline -% Print an ancient name, number, and sobriquet & \S |\AKA*{Gregory, I}{Gregory}[the Great]|\\\hline -% Mononym followed by a lesser-known name & |\PName{Prince}[Prince Rogers]{Nelson}|\\\hline -% Flexibly associate a name with a lesser-known name & \P \dots a tribute to |\Name{Ari Up}|, born \newline |\AKA{Ari Up}[Arianne]{Forster}|\dots \\\hline -% \end{tabular} -% -% \smallskip \S{} This depends on the default \texttt{nocomma} option.\\ -% \indent \P{} |{Ari Up}| is one unit; one would not index the stage name as ``Up, Ari''. -% \egroup -% -% \bigskip -% \noindent Avoiding the following pitfalls will save time and frustration: +% \subsubsection{Basic} +% These examples work predictably under the broadest conditions. % \begin{enumerate}\setlength\itemsep{0pt}\small -% \item Mixing sobriquets with modern forms fails due to the ``alternate name'' feature, e.g., |\Name[First]{Ancient}[Sobriquet]| and |\Name[King]{Number}[Sobriquet]|. -% \item Using \cmd{\AKA} and \cmd{\PName} with ``ancient,'' ``royal,'' and ``Eastern'' forms will fail, but see Section \ref{sec:suffix} for a workaround:\newline |\Name{Ancient}[Sobriquet] \AKA{Ancient Sobriquet}[First]{Last}|\newline |\Name{Queen}[Number] \AKA{Queen Number}[First]{Last}|\newline |\Name{EastFamily}[EastFirst] \AKA{EastFamily EastFirst}[First]{Last}| -% \item Using a forename or first initials can prevent failure in some cases:\newline OK: |\Name[J.]{Kreskin}[The Amazing] (\AKA[J.]{Kreskin}[Joseph]{Kresge})|\newline FAIL: |\Name[]{Kreskin}[The Amazing] (\AKA{Kreskin}[Joseph]{Kresge})|\newline FAIL: |\Name{Kreskin}[The Amazing] (\AKA{Kreskin}[Joseph]{Kresge})| -% \item Keep track of how name references are disambiguated in the text. Since one must put the full indexed name in a \cmd{\Name} reference it is easy to forget that the reference will be shortened if it is subsequent. \cmd{\Name*} comes to the rescue here. -% \item Mistyping the pairs of \texttt{\{} braces \texttt{\}} and \texttt{[} brackets \texttt{]} creates contextually-dependent errors that can be difficult to track. Leading spaces in macro arguments will create incorrectly sorted index entries. Take care to avoid them. +% \item First reference: \ForgetName[John]{Smith}\Name[John]{Smith}\\[0.5ex] +% |\Name*[John]{Smith}| or\\ |\Name[John]{Smith}| or\\ |\FName[John]{Smith}| +% \item Subsequent full name: \Name*[John]{Smith}\\[0.5ex] +% |\Name*[John]{Smith}| +% \item Subsequent surname: \Name[John]{Smith}\\[0.5ex] +% |\Name[John]{Smith}| +% \item Subsequent forename: \FName[John]{Smith}\\[0.5ex] +% |\FName[John]{Smith}| +% \item First mononym reference: \ForgetName{Plato}\Name{Plato}\\[0.5ex] +% |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}| +% \item Subsequent references: \Name{Plato}\\[0.5ex] +% |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}|\\[1.5ex] +% These next examples work with the \texttt{comma} option, not \cmd{\AKA} and \cmd{\PName}. The next page offers a workaround that depends on the \texttt{nocomma} option. +% \item First Eastern ref: \ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung]\\[0.5ex] +% |\Name*{Mao}[Tse-tung]| or\\ |\Name{Mao}[Tse-tung]| +% \item Subsequent references: \Name*{Mao}[Tse-tung]\\[0.5ex] +% |\Name*{Mao}[Tse-tung]| +% \item Subsequent references: \Name{Mao}[Tse-tung]\\[0.5ex] +% |\Name{Mao}[Tse-tung]| or\\ |\FName{Mao}[Tse-tung]| +% \item First royal: \ForgetName{Louis}[the Pious]\Name{Louis}[the Pious]\\[0.5ex] +% |\Name*{Louis}[the Pious]| or\\ |\Name{Louis}[the Pious]| or\\ |\FName{Louis}[the Pious]| +% \item Subsequent refs: \Name*{Louis}[the Pious]\\[0.5ex] +% |\Name*{Louis}[the Pious]| +% \item Subsequent references: \Name{Louis}[the Pious]\\[0.5ex] +% |\Name{Louis}[the Pious]| or\\ |\FName{Louis}[the Pious]| +% \item First ancient: \ForgetName{Ptolemy I}[Soter]\Name{Ptolemy I}[Soter]\\[0.5ex] +% |\Name*{Ptolemy I}[Soter]| or\\ |\Name{Ptolemy I}[Soter]| or\\ |\FName{Ptolemy I}[Soter]| +% \item Subsequent refs: \Name*{Ptolemy I}[Soter]\\[0.5ex] +% |\Name*{Ptolemy I}[Soter]| +% \item Subsequent refs: \Name{Ptolemy I}[Soter]\\[0.5ex] +% |\Name{Ptolemy I}[Soter]| or\\ |\FName{Ptolemy I}[Soter]| +% \item First royal: \ForgetName{Henry}[VIII]\Name{Henry}[VIII]\\[0.5ex] +% |\Name*{Henry}[VIII]| or\\ |\Name{Henry}[VIII]| or\\ |\FName{Henry}[VIII]| +% \item Subsequent refs: \Name*{Henry}[VIII]\\[0.5ex] +% |\Name*{Henry}[VIII]| +% \item Subsequent references: \Name{Henry}[VIII]\\[0.5ex] +% |\Name{Henry}[VIII]| or\\ |\FName{Henry}[VIII]|\\[1ex] % \end{enumerate} -% +% \subsubsection{Intermediate} +% The following employ alternate forenames. They keep regular forenames in the index. +% \begin{enumerate}\setlength\itemsep{0pt}\small +% \item Print an embellished first reference: \ForgetName[J.Q.]{Public}\Name[J.Q.]{Public}[Jane Q.]\\[0.5ex] +% |\Name*[J.Q.]{Public}[Jane Q.]| or\\ |\Name[J.Q.]{Public}[Jane Q.]| or\\ |\FName[J.Q.]{Public}[Jane Q.]| +% \item Subsequent full name, alternate forename, same person in index: \Name*[J.Q.]{Public}[Jane Qetsiyah]\\[0.5ex] +% {\footnotesize |\Name*[J.Q.]{Public}[Jane Qetsiyah]|} +% \item Subsequent ``shorter'' full name, same person in index: \Name*[J.Q.]{Public}\\[0.5ex] +% |\Name*[J.Q.]{Public}| +% \item Subsequent alternate forename, same person in index: \FName[J.Q.]{Public}[Janie]\\[0.5ex] +% |\FName[J.Q.]{Public}[Janie]| +% \end{enumerate} +% \subsubsection{Advanced} +% These next examples engage a number of special cases. Many depend on the default \texttt{nocomma} option. Always use a comma to delimit suffixes. Use a space or thin space after the comma. These forms will work with \cmd{\AKA} and \cmd{\PName}. See also Section \ref{sec:suffix} +% \begin{enumerate}\setlength\itemsep{0pt}\small +% \item First: \ForgetName[George S.]{Patton, Jr.}\Name[George S.]{Patton, Jr.}\\[0.5ex] +% {\footnotesize |\Name*[George S.]{Patton, Jr.}|\,or\\ |\Name[George S.]{Patton, Jr.}| or\\ |\FName[George S.]{Patton, Jr.}|} +% \item Subsequent full: \Name*[George S.]{Patton, Jr.}\\[0.5ex] +% |\Name*[George S.]{Patton, Jr.}| +% \item Subsequent surname: \Name[George S.]{Patton, Jr.}\\[0.5ex] +% |\Name[George S.]{Patton, Jr.}| +% \item Subsequent forename: \FName[George S.]{Patton, Jr.}[George]\\[0.5ex] +% |\FName[George S.]{Patton, Jr.}%|\\|[George]|\\[2ex] The next forms take advantage of comma suppression to implement forms of ancient, royal and Eastern names. Adding a final optional parameter is discouraged. +% \item First reference: \ForgetName{Gregory, I}\Name{Gregory, I}\\[0.5ex] +% |\Name*{Gregory, I}| or\\ |\Name{Gregory, I}| or\\ |\FName{Gregory, I}| +% \item Subsequent full name: \Name*{Gregory, I}\\[0.5ex] +% |\Name*{Gregory, I}| +% \item Subsequent name: \Name{Gregory, I}\\[0.5ex] +% |\Name{Gregory, I}| or\\ |\FName{Gregory, I}| +% \item First reference: \ForgetName{Demetrius, I Soter}\Name{Demetrius, I Soter}\\[0.5ex] +% |\Name*{Demetrius, I Soter}| or\\ |\Name{Demetrius, I Soter}| or\\ |\FName{Demetrius, I Soter}| +% \item Next full name: \Name*{Demetrius, I Soter}\\[0.5ex] +% |\Name*{Demetrius, I Soter}| +% \item Subsequent name: \Name{Demetrius, I Soter}\\[0.5ex] +% |\Name{Demetrius, I Soter}| or\\ |\FName{Demetrius, I Soter}| +% \item First reference: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen}\\[0.5ex] +% |\Name*{Sun, Yat-sen}| or\\ |\Name{Sun, Yat-sen}| or\\ |\FName{Sun, Yat-sen}| +% \item Subsequent full name: \Name*{Sun, Yat-sen}\\[0.5ex] +% |\Name*{Sun, Yat-sen}| +% \item Subsequent name: \Name{Sun, Yat-sen}\\[0.5ex] +% |\Name{Sun, Yat-sen}| or\\ |\FName{Sun, Yat-sen}|\\[2ex] The following illustrate the American style of particulate names. +% \item First: \Name[Walter]{de la Mare}\\[0.5ex] +% |\Name*[Walter]{de la Mare}| or\\ |\Name[Walter]{de la Mare}| or\\ |\FName[Walter]{de la Mare}| +% \item Next reference: \Name[Walter]{de la Mare}\\[0.5ex] +% |\Name[Walter]{de la Mare}| +% \item At start of sentence: \CapThis\Name[Walter]{de la Mare}\\[0.5ex] +% |\CapThis\Name[Walter]{de la Mare}| +% \item Forename: \FName[Walter]{de la Mare}\\[0.5ex] +% |\FName[Walter]{de la Mare}|\\[2ex] The following illustrate the Continental style of particulate names. The first keeps particles in the index. +% \item First: \Name[Johann Wolfgang von]{Goethe}\\[0.5ex] +% {\footnotesize |\Name*[Johann Wolfgang von]{Goethe}|\,or\\ |\Name[Johann Wolfgang von]{Goethe}|\,or\\ |\FName[Johann Wolfgang von]{Goethe}|} +% \item Subsequent surname: \Name[Johann Wolfgang von]{Goethe}\\[0.5ex] +% |\Name[Johann Wolfgang von]{Goethe}| +% \item Next forename: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang]\\[0.5ex] +% |\FName[Johann Wolfgang von]%|\\ |{Goethe}[Johann Wolfgang]|\\[2ex] The following Continental forms prevent the indexing of particles. +% \item First: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex] +% {\footnotesize|\Name*[Adolf]{Harnack}[Adolf von]|\,or\\ |\Name[Adolf]{Harnack}[Adolf von]|\,or\\ |\FName[Adolf]{Harnack}[Adolf von]|} +% \item Next full name: \Name*[Adolf]{Harnack}[Adolf von]\\[0.5ex] +% |\Name*[Adolf]{Harnack}[Adolf von]| \\[2ex] With the following example, the final optional parameter can be dropped. +% \item Subsequent surname: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex] +% |\Name[Adolf]{Harnack}[Adolf von]| +% \item Subsequent forename: \FName[Adolf]{Harnack}\\[0.5ex] +% |\FName[Adolf]{Harnack}| +% \end{enumerate} +% \subsubsection{Expert} +% The following examples deal with complicated or technical macros. +% \begin{enumerate}\setlength\itemsep{0pt}\small +% \item Index, but do not print a reference to ``Public, J.Q.'' \IndexName[J.Q.]{Public}\\[0.5ex] +% |\IndexName[J.Q.]{Public}|\\[0.5ex] Note that in Western names, the final optional parameters are ignored. +% \item Index, but do not print a reference to ``Plato'' \IndexName{Plato}\\[0.5ex] +% |\IndexName{Plato}| +% \item Index, but do not print a reference to ``Mao Tse-tung'' \IndexName{Mao}[Tse-tung]\\[0.5ex] +% |\IndexName{Mao}[Tse-tung]| +% \item Index, but do not print a reference to ``Henry VIII'' \IndexName{Henry}[VIII]\\[0.5ex] +% |\IndexName{Henry}[VIII]| +% \item Index, but do not print a reference to ``Ptolemy I Soter'' \IndexName{Ptolemy I}[Soter]\\[0.5ex] +% |\IndexName{Ptolemy I}[Soter]|\\[0.5ex] The following only work with the default \texttt{nocomma} option. +% \item Index, but do not print a reference to ``Gregory I'' \IndexName{Gregory, I}\\[0.5ex] +% |\IndexName{Gregory, I}| +% \item Index, but do not print a reference to ``Sun Yat-sen'' \IndexName{Sun, Yat-sen}\\[0.5ex] +% |\IndexName{Sun, Yat-sen}| +% \item Following a name, print a pseudonym in parentheses. \PName[Bob]{Hope}[Leslie Townes]{Hope}\\[0.5ex] +% |\PName[Bob]{Hope}%|\\|[Leslie Townes]{Hope}| +% \item Print a name that is only a \emph{see} reference to another: \AKA[Bob]{Hope}[Lester T.]{Hope}\\[0.5ex] +% |\AKA[Bob]{Hope}[Lester T.]{Hope}|\\[2ex] The following only works with the default \texttt{nocomma} option. +% \item Print a name and ``sobriquet'' for an ancient name, making it a cross-reference: \AKA{Leo, I}{Leo}[the Great]\\[0.5ex] +% |\AKA{Leo, I}{Leo}[the Great]| +% \item Print only the ``sobriquet'' form directly after a \cmd{\Name} reference: \Name{Leo, I} ``\AKA*{Leo, I}{Leo}[the Great]''\\[0.5ex] +% |\Name{Leo, I}| |``\AKA*{Leo, I}%| |{Leo}[the Great]''| +% \end{enumerate} +% \subsubsection{Pitfalls} +% Avoiding the following pitfalls will save time and frustration: +% \begin{enumerate}\setlength\itemsep{0pt}\small +% \item Mixing sobriquets with modern forms fails due to the ``alternate name'' feature:\\ |\Name[First]{Ancient}[Sobriquet]|\\ |\Name[King]{Number}[Sobriquet]| +% \item Using \cmd{\AKA} and \cmd{\PName} with sobriquet-based forms will fail unless you use comma-delimited suffixes. See Section \ref{sec:suffix}. +% \item Using a forename or first initials can prevent failure in some cases:\\[0.5ex]{\footnotesize OK: |\Name[J.]{Kreskin}[The Amazing]|\\ |(\AKA[J.]{Kreskin}[Joseph]{Kresge})|\\[0.5ex] FAIL: |\Name[]{Kreskin}[The Amazing]|\\ |(\AKA{Kreskin}[Joseph]{Kresge})|\\[0.5ex] FAIL: |\Name{Kreskin}[The Amazing]|\\ |(\AKA{Kreskin}[Joseph]{Kresge})|} +% \item \cmd{\Name} can shorten a reference even if you use the full name in the text. +% \item Unbalanced or incorrect \texttt{\{} braces \texttt{\}} and \texttt{[} brackets \texttt{]}, as well as forgetting the periods in initials, create errors that can be difficult to track. Leading spaces in macro arguments will create incorrectly sorted index entries. +% \end{enumerate} +% \end{multicols} + % % \subsection{Basic Macros: \bsc Name and \bsc FName} % % \subsubsection{\texttt{\bsc Name} and \texttt{\bsc Name*}} @@ -278,27 +352,14 @@ % % I mentioned conditional use. The unstarred form prints the ``full name'' at the first occurrence, then only the partial form thereafter. The starred form always prints the full name. Both macros usually apply a different ``font attribute'' to the name when it first appears in the running text. % -% As long as the ``main'' \emph{FNN} are constant, the ``alternate names'' field can vary, yet the index entries will be constant. All references below refer to ``De Wette, Wilhelm M.L.'' in the index: -% -% \begin{quote}\small -% |\Name[Wilhelm M.L.]{De Wette}[Wilhelm Martin Leberecht]|\\ -% \Name[Wilhelm M.L.]{De Wette}[Wilhelm Martin Leberecht] (text, first occurrence)\\ -% \Name[Wilhelm M.L.]{De Wette}[Wilhelm Martin Leberecht] (text, second occurrence)\\ -% -% \ForgetName[Wilhelm M.L.]{De Wette}% -% |\Name[Wilhelm M.L.]{De Wette}|\\ -% \Name[Wilhelm M.L.]{De Wette} (text, first occurrence)\\ -% \Name[Wilhelm M.L.]{De Wette} (text, second occurrence) -% \end{quote} -% -% \noindent Alternate forenames only get printed in subsequent occurrences of \cmd{\Name*}. The surname argument is \emph{always} printed. +% As long as the ``main'' \emph{FNN} are constant in Western-style names, the ``alternate names'' field can vary, yet the index entries will be constant. Sections \ref{sec:example} and \ref{sec:start} contain a number of ``intermediate'' examples that illustrate this ability to swap out forenames. This is useful when dropping out references to middle initials in \cmd{\FName}. Alternate forenames only get printed in subsequent occurrences of \cmd{\Name*} and \cmd{\FName}. The surname argument is \emph{always} printed in \cmd{\Name*} and \cmd{\Name}. % % Another option employs a ``sobriquet'' feature for royal names and basic Eastern names. \cmd{\AKA} and \cmd{\PName} cannot refer to these forms, although they can use these forms in the \emph{second} name argument to construct a cross-reference. A workaround is discussed in Section \ref{sec:suffix}. The following method is the only one that works with the \texttt{comma} option. Valid ``sobriquet'' forms are:\\ % -% \bgroup\footnotesize +% \bgroup\footnotesize\ForgetName{Henry}[VIII] % \begin{tabular}{llp{1.2cm}ll}\hline % {\normalsize\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result & Function\\\hline -% (none) & \texttt{Henry} & \texttt{VIII} & \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\ +% (none) & \texttt{Henry} & \texttt{VIII} & \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\\ % (none) & \texttt{Henry} & \texttt{VIII} & \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\\\hline % (none) & \texttt{Chiang} & \texttt{Kai-shek} & \Name{Chiang}[Kai-shek] & |\Name{Chiang}[Kai-shek]|\\ % (none) & \texttt{Chiang} & \texttt{Kai-shek} & \Name{Chiang}[Kai-shek] & |\Name{Chiang}[Kai-shek]|\\\hline @@ -312,7 +373,7 @@ % \subsubsection{\texttt{\bsc FName}} % % \DescribeMacro{\FName} -% This casual friend of \cmd{\Name} prints only ``first'' names except if a first use occurs, whereupon it prints a full, formatted name as set by the class options or the formatting macros. The syntax is basically the same: +% This casual friend of \cmd{\Name} prints only ``first'' names except if a first use occurs, whereupon it prints a full, formatted name as set by the class options or the formatting macros. \cmd{\FName} is intended for Western-style names. The syntax is basically the same: % \begin{quote} % \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} @@ -334,8 +395,6 @@ % %\noindent A good way to cut keystrokes would be to assign the above macro to the control sequence \cmd{\Sully}. With comma-delimited suffixes we note special cases governed by the \texttt{nocomma} class option (see Section \ref{sec:suffix}). These include names like like \FName[J.D.]{Rock, III} and \FName{Charles, V}: % \begin{quote}|\FName[J.D.]{Rock, III}|, ``\FName[J.D.]{Rock, III},'' |\FName{Charles, V}|, ``\FName{Charles, V}''\end{quote} -% \noindent \FName{Mao}[Tse-tung], ``\FName{Mao}[Tse-tung],'' does not work well with \cmd{\FName}, which assumes Western names and mononyms. -% % \cmd{\FName} suppresses extra periods if a forename with initials occurs at the end of a sentence, as in the plot-line ``who shot \FName[J.D.]{Rock, III}.'' See also Section \ref{sec:suffix}. % % \subsection{Advanced Topics} @@ -354,13 +413,13 @@ % \subsubsection{Naming Conventions} % % \DescribeMacro{\CapThis} -% English names with the particles \emph{de}, \emph{de\ la}, \emph{d'}, \emph{von}, \emph{van}, and \emph{ten} generally keep them with the last name, using varied capitalization. \emph{Le}, \emph{La}, and \emph{L'} are capitalized unless preceded by \emph{de}. In English, these particles go in the \emph{SNN} field of \cmd{\Name}, e.g., \Name[Walter]{de la Mare}. To capitalize the first particle in a subsequent \cmd{\Name} reference at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. +% English names with the particles \emph{de}, \emph{de\ la}, \emph{d'}, \emph{von}, \emph{van}, and \emph{ten} generally keep them with the last name, using varied capitalization. \emph{Le}, \emph{La}, and \emph{L'} are capitalized unless preceded by \emph{de}. In English, these particles go in the \emph{SNN} field of \cmd{\Name}, e.g., \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare}. To capitalize the first particle in a subsequent \cmd{\Name} reference at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. % -% Names foreign to English usually put these particles in the \emph{FNN} field of \cmd{\Name}. Yet these particles are not first names. Using \cmd{\FName} with alternate forenames overcomes this issue. |\FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang]| prints subsequently as \SubvertName[Johann Wolfgang von]{Goethe}\FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang]. This trades work for robustness. +% Names foreign to English usually put these particles in the \emph{FNN} field of \cmd{\Name}. Yet these particles are not first names. Using \cmd{\FName} with alternate forenames overcomes this issue. Section \ref{sec:start} likely has the best illustration of this. % % \subsubsection{Hyphenation} % -% I find it helpful to use the \textsf{babel} or \textsf{polyglossia} packages to help with name hyphenation. If one is using English as the main language, the default hyphenation patterns may not suffice. For example, the name \Name[John]{Strietelmeier} may break thus: ``Stri-etelmeier.'' That is fixed by creating a \cmd{\de} macro equivalent to |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| (using \textsf{babel}) and writing |\de{\Name[John]{Strietelmeier}}|. +% I find it helpful to use respectively the \textsf{babel} or \textsf{polyglossia} packages with name hyphenation. If one is using English as the main language, the default hyphenation patterns may not suffice. For example, the name \Name[John]{Strietelmeier} may break thus: ``Stri-etelmeier.'' That is fixed by creating a \cmd{\de} macro equivalent to |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| (using \textsf{babel}) and writing |\de{\Name[John]{Strietelmeier}}|. % % One can insert optional hyphens in the arguments of \cmd{\Name} and friends but that must be done \emph{consistently} to avoid variants being treated as different names. % @@ -410,7 +469,7 @@ % % Using the default class option \texttt{nocomma} with suffix removal, one can take advantage of the suffix feature to tweak more possibilities out of \cmd{\Name}. Instead of the sobriquet feature, one could use the following variants: % -% \begin{quote}\small +% \begin{quote}\small\ForgetName{Sun, Yat-sen} % \begin{tabular}{llp{1.2cm}ll}\hline % {\large\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result & Function\\\hline % (none) & \texttt{Louis, XIV} & (none) & \Name{Louis, XIV} & |\Name{Louis, XIV}|\\ @@ -525,21 +584,30 @@ % \noindent The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. For example: % % \begin{quote} -% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}|\\ +% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}| compared to\\ % |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\ % Print \PName*[Mark]{Twain}[Samuel L.]{Clemens} the first time it appears. Later, print \PName*[Mark]{Twain}[Samuel L.]{Clemens}. The form \cmd{\PName} later just prints \PName[Mark]{Twain}[Samuel L.]{Clemens}.\\[1ex] -% |\PName*{Voltaire}[François-Marie]{Arouet}|\\ +% |\PName*{Voltaire}[François-Marie]{Arouet}| and\\ % |\PName{Voltaire}[François-Marie]{Arouet}|\\ -% Print \PName{Voltaire}[François-Marie]{Arouet} the first time it appears. Later, print \PName{Voltaire}[François-Marie]{Arouet}. Both forms do the same thing in this case. +% Print \PName{Voltaire}[François-Marie]{Arouet} the first time it appears. Later, print \PName{Voltaire}[François-Marie]{Arouet}. % \end{quote} % % \noindent If you use the unstarred forms \cmd{\PName} and \cmd{\Name}, you must remember that, just because you include a full name as a parameter does not mean that the full name will print. You could end up with ambiguous references to the same last name, e.g., ``Snel van Royen.'' You are responsible for checking this. -%\clearpage % % \subsection{Accented Names} -% \label{sec:Accents} +% \label{sec:accents} % -% This snippet from the preamble allows this document to be typeset with multiple engines that support the \LaTeX\ format:\\ +% The snippet on the next page from the preamble allows this document to be typeset with multiple engines. I used the following in the text to test what is being used:\\ +% +% \bgroup\footnotesize% +% \noindent |\ifxetex\textsf{xelatex}%|\\ +% |\else\ifluatex%|\\ +% \hbox{\qquad}|\ifpdf\textsf{lualatex} in \texttt{pdf} mode%|\\ +% \hbox{\qquad}|\else\textsf{lualatex} in \texttt{dvi} mode\fi%|\\ +% \hbox{\quad}|\else%|\\ +% \hbox{\qquad}|\ifpdf\textsf{pdflatex}%|\\ +% \hbox{\qquad}|\else\textsf{latex}\fi\fi%|\\ +% |\fi{}|\egroup % % \bgroup\footnotesize% % \begin{tabular}{ll} @@ -557,13 +625,6 @@ % \hbox{\quad}|\else| & |% with pdflatex and latex|\\ % \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\ % \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\ -% \hbox{\qquad}|\usepackage{lmodern}| & |% or other font with TS1 glyphs|\\ -% \hbox{\qquad}|\usepackage{newunicodechar}| & |% get more accents|\\ -% \hbox{\qquad}|\DeclareTextSymbolDefault{\textlongs}{TS1}|\\ -% \hbox{\qquad}|\DeclareTextSymbol{\textlongs}{TS1}{115}|\\ -% \hbox{\qquad}|\newunicodechar{ſ}{\textlongs}|\\ -% \hbox{\qquad}|\newunicodechar{ā}{\=a}|\\ -% \hbox{\qquad}|\newunicodechar{ṃ}{\d{m}}| & |% and so on|\\ % \hbox{\quad}|\fi|\\ % |\fi| % \end{tabular} @@ -589,8 +650,9 @@ % \end{tabular} % \end{quote} % -% \noindent More accented characters are possible via the \textsf{newunicodechar} package, but that could complicate matters with \textsf{makeindex} embedding control sequences in index entries. Some control sequences, like the ``a'' with macron |\=a|, will fail using \textsf{makeindex} and \texttt{gind.ist} because they will be interpreted as ``literals.'' +% \noindent \emph{Caveat}: If one uses \textsf{inputenc} with the \texttt{utf8} option together with \textsf{microtype} and the \textsf{memoir} class, \cmd{\Name}, etc. will cause \textsf{microtype} to emit errors if one uses accented characters apart from the list above. One can avoid this issue by manually formatting and indexing names that contain characters apart from the list. Control sequences like |\=a| also fail when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is interpreted as a ``literal.'' % +% Technically, \textsf{microtype} wants the control sequences fully expanded via \cmd{\edef} when comma suppression and suffix removal occur in \cmd{\Name} and \cmd{\FName}. Fixing that conflict puts accented characters directly into the \texttt{.aux} files when using \textsf{inputenc} with the \texttt{utf8} option and the indexing macros built into \textsf{memoir}. That causes a conflict with \textsf{inputenc}. The workaround for that is to use \cmd{\def}, which then conflicts with \textsf{microtype}. Until I can determine whether a permanent workaround exists, I have chosen the lesser of two package conflicts. If someone knows of a solution, I will implement it and give credit where it is due. % \subsection{Name Formatting} % \label{sec:formatting} % @@ -616,7 +678,7 @@ % % \noindent After using \cmd{\let} to revert \cmd{\NamesFormat}, a first occurrence again takes the form: \ForgetName{Vlad III}[Dracula]\Name{Vlad III}[Dracula], while subsequent references are to \Name{Vlad III}[Dracula].\\ % -% Let me again stress that ``royal'' names used in this manner do not work with \cmd{\PName} and \cmd{\AKA}. Consistently use either the suffix mechanism (Section \ref{sec:suffix}) or use as a guide the examples above for \Name*{Jean}[sans Peur] and \Name*{Thomas}[Aquinas]. If you use the suffix mechanism, you would use the following forms: +% Let me again stress that the forms above do not work with \cmd{\PName} and \cmd{\AKA}. Consistently use either the suffix mechanism (Section \ref{sec:suffix}) or use as a guide the examples above for \Name*{Jean}[sans Peur] and \Name*{Thomas}[Aquinas]. If you use the suffix mechanism, you would use the following forms: % %\begin{quote}\ForgetName{Vlad III}[Dracula]\ForgetName{Vlad II}[Dracul] % \bgroup\ttfamily |\Name{Vlad III, Dracula}| became known as \break |\AKA{Vlad III, Dracula}{Vlad}[Ţepeş]|,\break |``\AKA{Vlad III, Dracula}{Vlad}[the Impaler],''| after his death. He was the son of |\Name{Vlad II, Dracul}|, a member of the Order of the Dragon. Later references to |\Name{Vlad III, Dracula}| appear thus.\egroup @@ -681,7 +743,7 @@ % \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % -% \noindent This macro causes \cmd{\Name} and friends to think that prior uses of a name have already occurred. The next use will print as if it were a ``subsequent use.'' +% \noindent This macro causes \cmd{\Name} and friends to think that a prior use of a name already has occurred. The next use will print as if it were a ``subsequent use.'' % % \StopEventually{\PrintChanges\clearpage\PrintIndex} % @@ -694,10 +756,10 @@ % % \begin{macrocode} \newif\if@nameauth@DoFormat -\newif\if@nameauth@DoComma \newif\if@nameauth@DoIndex +\newif\if@nameauth@DoComma % \end{macrocode} -% These Boolean values are used to control formatting, comma, and index suppression. They all may be set with class options, but the latter two can be toggled with user interface macros.\\ +% These Boolean values are used to control formatting, index suppression, and comma suppression. They all may be set with class options, but the first two can be toggled with the user interface macros \cmd{\NamesActive}---\cmd{\NamesInctive} and \cmd{\IndexActive}---\cmd{\IndexInctive}.\\ % % \begin{macrocode} \newif\if@nameauth@Comma @@ -709,7 +771,7 @@ % \begin{macrocode} \newif\if@nameauth@DoCaps % \end{macrocode} -% This Boolean triggers select first letter capitalization of names preceded by particles like \emph{de la} that may need occasional initial capitalization.\\ +% This Boolean triggers select first letter capitalization of names preceded by particles like \emph{de la} that may need occasional initial capitalization. That first letter capitalization happens only in \cmd{\Name}.\\ % % \changes{v0.85}{2012/02/05}{Added nocomma, comma options} % \changes{v0.94}{2012/02/15}{Added index, noindex options} @@ -742,7 +804,7 @@ % \end{macrocode} % \end{macro} % Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string based on the forename/surname parameters of \cmd{\Name} and friends. With this we can construct a control sequence name. Testing for the presence of that control sequence determines the existence of pseudonyms and the first occurrence of a name.\bigskip\hrule\bigskip -% \noindent The following macros parse a ``base'' name into a radix and a suffix. They are designed so that their function occurs completely at the time of macro expansion, not execution. This expandability is key to the proper function of this package. They form the kernel of the suffix removal and comma suppression features. +% \noindent The following macros parse a ``base'' name into a radix and a suffix. They are designed so that their function occurs at the time of macro expansion, not execution. This expandability is key to the proper indexing function of this package. They form the kernel of the suffix removal and comma suppression features. % % \begin{macro}{\@nameauth@Root} % \changes{v0.85}{2012/02/05}{Revise suffix handling} @@ -754,7 +816,7 @@ } % \end{macrocode} % \end{macro} -% Anything starting with a comma and ending with the end of the name is stripped off. That includes ``Sr.,'' ``Jr.,'' ``III,'' and so on. An extra comma is included at the end of the parameter when |\@nameauth@Root| is called directly from \cmd{\Name} and friends so that the delimiter list will always be correct. By using the comma-checking routines below, however, one can call this macro only when the parameter takes the form <a,b> and properly select the root and suffix (see below). +% Anything starting with a comma and ending with the end of the name is stripped off. That includes ``Sr.,'' ``Jr.,'' ``III,'' and so on. An extra comma is included at the end of the parameter when |\@nameauth@Root| is called directly from \cmd{\Name} and friends so that the delimiter list will always be correct. By using \cmd{\@nameauth@CheckComma} below, one can call this macro only when the parameter takes the form <a,b>. This allows one to select the root and suffix without having a trailing comma hanging about. % % \begin{macro}{\@nameauth@TrimRoot} % \changes{v0.85}{2012/02/05}{Divide suffix handling into functional parts} @@ -763,7 +825,7 @@ \def\@nameauth@TrimRoot#1,#2\relax{#1} % \end{macrocode} % \end{macro} -% This delimited-parameter macro strips off the first parameter. +% This delimited-parameter macro strips off the second parameter as it returns the first. % % \begin{macro}{\@nameauth@Suffix} % \changes{v0.9}{2012/02/10}{added macro} @@ -774,7 +836,7 @@ } % \end{macrocode} % \end{macro} -% Anything before a comma is stripped off by |\@nameauth@Suffix|, but it should be called only in a conditional governed by |@nameauth@Comma|. This macro calls its auxiliary macro below. +% Anything before a comma is stripped off by |\@nameauth@Suffix|, but it should be called only in a conditional governed by |@nameauth@Comma| and \cmd{\@nameauth@CheckComma} or else errors will result. This macro calls its auxiliary macro below. % % \begin{macro}{\@nameauth@TrimSuffix} % \changes{v0.9}{2012/02/10}{added macro} @@ -782,7 +844,7 @@ \def\@nameauth@TrimSuffix#1,#2\relax{#2} % \end{macrocode} % \end{macro} -% This delimited-parameter macro strips off the second parameter. +% This delimited-parameter macro strips off the first parameter and returns the second. % % \begin{macro}{\@nameauth@CheckComma} % \changes{v0.85}{2012/02/05}{Add suffix handling functionality} @@ -794,7 +856,7 @@ } % \end{macrocode} % \end{macro} -% This macro checks for a comma-delimited suffix. It calls its auxiliary macro below. +% This macro checks for a comma-delimited suffix. It calls the auxiliary macro below. % % \begin{macro}{\@nameauth@CheckSuffix} % \changes{v0.9}{2012/02/10}{Added macro} @@ -806,20 +868,8 @@ } % \end{macrocode} % \end{macro} -% This macro checks for a comma-delimited suffix and sets the Boolean |@nameauth@Comma| accordingly. -% -% \begin{macro}{\@nameauth@NoComma} -% \changes{v0.85}{2012/02/05}{Revise suffix handling} -% \changes{v0.9}{2012/02/10}{Redesigned macro} -% \begin{macrocode} -\newcommand*{\@nameauth@NoComma}[1]% -{% - \@nameauth@Root{#1}\@nameauth@Suffix{#1}% -} -% \end{macrocode} -% \end{macro} -% This macro removes a comma from a name by breaking a <root, suffix> pair into a <root><suffix> pair. It preserves the leading space or lack thereof in the suffix.\bigskip\hrule\bigskip -% \noindent The following macros implement the mechanism to prevent the double-printing of a period after ``Sr.,'' ``Jr.,'' and so on. +% This macro checks for a comma-delimited suffix and sets the Boolean |@nameauth@Comma| true if the suffix is not equal to the empty string.\bigskip\hrule\bigskip +%\noindent The next macros check whether the next token is a period. They are only called if the terminal character produced within \cmd{\Name} and \cmd{\FName} is itself a period. % % \begin{macro}{\@nameauth@CheckDot} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} @@ -853,9 +903,9 @@ } % \end{macrocode} % \end{macro} -% While \cmd{\@nameauth@CheckDot} looks \emph{ahead} for a period, \cmd{\@nameauth@TestDot}---based on a snippet by \Name*[Uwe]{Lueck}---checks for a terminal period in the name passed to it, ignoring medial periods. It always resets the Boolean value before making its test, making it unnecessary to reset elsewhere.\clearpage\hrule\bigskip +% While \cmd{\@nameauth@CheckDot} looks \emph{ahead} for a period, \cmd{\@nameauth@TestDot}---based on a snippet by \Name*[Uwe]{Lueck}---checks for a terminal period in the name passed to it, ignoring medial periods. It always resets the Boolean value before making its test, making it unnecessary to reset elsewhere.\bigskip\hrule\bigskip % -% \noindent The following two macros format the output for \cmd{\Name} and friends. One is used only by \cmd{\FName} because that has different formatting needs that clash with other instances of formatting. Here also is where indexing is controlled. +% \noindent The following macros format the output for \cmd{\Name} and friends. % % \begin{macro}{\@nameauth@FmtName} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} @@ -874,7 +924,7 @@ } % \end{macrocode} % \end{macro} -% \cmd{\@nameauth@FmtName} is where the first occurrences of a name are formatted. Notice how \cmd{\NamesFormat} sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change. The \cmd{\NamesFormat} hook has been discussed above. The main reason for making this a separate macro was to offer a means of adding features in modular fashion. +% \cmd{\@nameauth@FmtName} is where the first occurrences of a name are formatted. Notice how \cmd{\NamesFormat} sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change. The \cmd{\NamesFormat} hook has been discussed above. % % \begin{macro}{\@nameauth@Index} % \changes{v0.94}{2012/02/15}{Added macro} @@ -884,7 +934,7 @@ } % \end{macrocode} % \end{macro} -% If the indexing flag is true, create an index entry, otherwise do nothing +% If the indexing flag is true, create an index entry, otherwise do nothing. % % \begin{macro}{\@nameauth@CapRoot} % \changes{v0.95}{2012/02/17}{Added macro} @@ -895,7 +945,7 @@ } % \end{macrocode} % \end{macro} -% This macro implements the particulate name capitalization mechanism. It is done on entry to \cmd{\Name} in order that certain accents that generate control sequences do not cause incompatibility with the \textsf{microtype} package. +% This macro implements the particulate name capitalization mechanism. All of the macros that manipulate strings through parametrized expansion appear to work best when called immediately in \cmd{\Name} and \cmd{\FName}. % % \begin{macro}{\@nameauth@CR} % \changes{v0.95}{2012/02/17}{Added macro} @@ -910,10 +960,13 @@ % \begin{macro}{\CapThis} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} -\newcommand{\CapThis}{\@nameauth@DoCapstrue} +\newcommand{\CapThis}% +{% + \@nameauth@DoCapstrue% +} % \end{macrocode} % \end{macro} -% Toggle the capitalizing of particles. The next time a formatting macro is called it will flip the state back to no caps until this is called again. +% Toggle the capitalizing of particles. \cmd{\@nameauth@FmtName} always reverts the Boolean to false, thus localizing any changes until this is called again. % % \begin{macro}{\Name} % \changes{v0.75}{2012/01/19}{Added ``sobriquet'' feature} @@ -922,10 +975,12 @@ % \changes{v0.9}{2012/02/10}{Redesigned macro} % \changes{v0.94}{2012/02/15}{Error checking expanded} % \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}} +% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.} % \begin{macrocode} \DeclareDocumentCommand\Name{s o m o}% {% - \def\Surnames{#3}% + \edef\Surnames{#3}% + \def\ISurnames{#3}% \if@nameauth@DoCaps% \def\Shortnames{\@nameauth@CapRoot{#3,}}% \else% @@ -935,44 +990,45 @@ \@nameauth@CheckComma{#3}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\ISurnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \fi% \IfValueTF{#2}% {\IfValueTF{#4}% - {\edef\Forenames{#4}}{\edef\Forenames{#2}}% + {\def\Forenames{#4}}{\def\Forenames{#2}}% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #2 #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \fi% \fi}% @@ -981,35 +1037,35 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 #4 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 #4 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \else% \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \fi% \fi}% @@ -1017,34 +1073,34 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -1059,7 +1115,7 @@ % % Regarding the remaining eighteen branches, one cannot assume that the name will terminate with a suffix like ``Jr.'' until a check has been run to determine if the suffix should be truncated. The Boolean and value parameters offer eight valid patterns of input. The first or subsequent use are two more, as are front or main matter use. Operations on suffixes are governed by the first or subsequent use. The formatting or non-formatting of output is governed both by a formatting Boolean and by first/subsequent use. A final choice deals with handling alternate names in the \cmd{\Forenames} macro. % -% Here is how these many factors interrelate: \cmd{\Name} first checks for comma suppression. if so it stores a comma-suppressed version of the third parameter in \cmd{\Surnames}. Otherwise it stores an unchanged version in \cmd{\Surnames}. This will be passed to \cmd{\@nameauth@Index} and |\@nameauth@FmtName|.\\ +% Here is how these many factors interrelate: \cmd{\Name} first checks for comma suppression. if so it stores a comma-suppressed version of the third parameter in \cmd{\Surnames}. Otherwise it stores an unchanged version in \cmd{\Surnames} and \cmd{\ISurnames}. The former needs to be fully expanded for the double-period checking to work, thus using \cmd{\edef}. The latter should not be fully expanded when using the \textsf{memoir} class with the utf8 option of \textsf{inputenc}. This will be passed respectively to \cmd{\@nameauth@FmtName} and \cmd{\@nameauth@Index}.\\ % %\noindent \cmd{\Name} then checks for the forenames argument. Two outcomes are possible. % \begin{enumerate} @@ -1086,14 +1142,17 @@ % \begin{macro}{\FName} % \changes{v0.9}{2012/02/10}{Added macro} % \changes{v0.94}{2012/02/15}{Error checking expanded} +% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.} % \begin{macrocode} \DeclareDocumentCommand\FName{o m o}% {% - \def\Surnames{#2}% + \edef\Surnames{#2}% + \def\ISurnames{#2}% \if@nameauth@DoComma\else% \@nameauth@CheckComma{#2}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% + \def\ISurnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% \fi% \fi% \IfValueTF{#1}% @@ -1102,29 +1161,29 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #1 #2 cannot be a page reference.}% + {\bsc FName Cross-reference: #1 #2 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \fi% \fi}% @@ -1133,27 +1192,27 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc FName Cross-reference: #2 #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \fi% \fi}% @@ -1161,26 +1220,26 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 cannot be a page reference.}% + {\bsc FName Cross-reference: #2 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -1189,7 +1248,7 @@ } % \end{macrocode} % \end{macro} -% \cmd{\FName} is derived from \cmd{\Name}, but scaled back to print forename(s) in a subsequent use. It obeys the \texttt{nocomma} behavior and eliminates double periods. +% \cmd{\FName} is derived from \cmd{\Name} and uses its logic to print forename(s) in a subsequent use. It obeys the \texttt{nocomma} option and eliminates double periods. % % \begin{macro}{\AKA} % \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility} @@ -1204,11 +1263,11 @@ \if@nameauth@DoComma\else% \@nameauth@CheckComma{#3}% \if@nameauth@Comma% - \edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \@nameauth@CheckComma{#5}% \if@nameauth@Comma% - \edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% + \def\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% \fi% \fi% \IfValueTF{#4}% @@ -1244,11 +1303,11 @@ \else% \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}% \IfValueTF{#2}% @@ -1262,11 +1321,11 @@ \else% \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5!PN!}}{}% \IfValueTF{#2}% @@ -1280,7 +1339,7 @@ } % \end{macrocode} % \end{macro} -% \cmd{\AKA} prints a pseudonym and creates index cross-references. Its starred form suppresses the ``main'' pseudonym if a sobriquet is passed in the alternate name parameter. It prevents multiple generation of cross-references. Like \cmd{\Name} it suppresses double periods. Its choices reflect the different choices of index references, based on the arguments it receives. +% \cmd{\AKA} prints a pseudonym and creates index cross-references. Its starred form prints only the alternate name parameter, if that exists. It prevents multiple generation of cross-references and suppresses double periods. % % \begin{macro}{\PName} % \changes{v0.85}{2012/02/05}{Add comma suppression} @@ -1338,15 +1397,15 @@ {% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName XRef: #1 #2 exists.}% + {\bsc ExcludeName XRef: #1 #2 exists.}% \else% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% \fi% @@ -1357,11 +1416,11 @@ \else% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}% \fi% @@ -1371,11 +1430,11 @@ \else% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2!PN!}}{}% \fi% @@ -1385,7 +1444,7 @@ } % \end{macrocode} % \end{macro} -% This macro prevents a name from being indexed by using the exclusion mechanism of \cmd{\AKA} to prevent the other macros from indexing a name. +% This macro prevents a name from being indexed by using the exclusion mechanism of \cmd{\AKA} to prevent the other macros from indexing a name. The result is that \cmd{\Name} and friends will print their arguments, emit a warning, and continue.\clearpage % % \begin{macro}{\ForgetName} % \changes{v0.75}{2012/01/19}{New parameter added} @@ -1423,21 +1482,21 @@ } % \end{macrocode} % \end{macro} -% \cmd{\SubvertName} defines control sequences to suppress the ``first use'' of \cmd{\Name}. +% \cmd{\SubvertName} defines control sequences to suppress the ``first use'' of \cmd{\Name}.\bigskip\hrule\bigskip +% +% \noindent The following macros toggle formatting and indexing. % % \begin{macro}{\NamesInactive} % \begin{macrocode} \newcommand{\NamesInactive}{\@nameauth@DoFormatfalse} % \end{macrocode} % \end{macro} -% This macro deactivates formatting, even as its counterpart below activates it. % % \begin{macro}{\NamesActive} % \begin{macrocode} \newcommand{\NamesActive}{\@nameauth@DoFormattrue} % \end{macrocode} % \end{macro} -% This macro is called automatically with the \texttt{mainmatter} option. % % \begin{macro}{\IndexInactive} % \changes{v0.94}{2012/02/15}{Added macro} @@ -1445,7 +1504,6 @@ \newcommand{\IndexInactive}{\@nameauth@DoIndexfalse} % \end{macrocode} % \end{macro} -% This macro deactivates indexing in sections where one may want formatting but not indexing. % % \begin{macro}{\IndexActive} % \changes{v0.94}{2012/02/15}{Added macro} @@ -1453,8 +1511,6 @@ \newcommand{\IndexActive}{\@nameauth@DoIndextrue} % \end{macrocode} % \end{macro} -% This macro is called automatically with the \texttt{index} option. -% % \clearpage % \Finale \endinput diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty index 59d78f55211..c885879b27d 100644 --- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty +++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty @@ -22,11 +22,12 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{nameauth} - [2012/02/17 v0.95 name authority macros to aid consistent display and indexing of names] + [2012/02/19 v0.96 name authority macros to aid consistent display and indexing of names] + % %% \DescribeMacro{\IndexActive} \newif\if@nameauth@DoFormat -\newif\if@nameauth@DoComma \newif\if@nameauth@DoIndex +\newif\if@nameauth@DoComma \newif\if@nameauth@Comma \newif\if@nameauth@Punct \newif\if@nameauth@DoCaps @@ -67,10 +68,6 @@ \def\Test{#2}% \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi% } -\newcommand*{\@nameauth@NoComma}[1]% -{% - \@nameauth@Root{#1}\@nameauth@Suffix{#1}% -} \def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot} \def\@nameauth@EvalDot% {% @@ -100,10 +97,14 @@ \@nameauth@CR#1\relax% } \def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}} -\newcommand{\CapThis}{\@nameauth@DoCapstrue} +\newcommand{\CapThis}% +{% + \@nameauth@DoCapstrue% +} \DeclareDocumentCommand\Name{s o m o}% {% - \def\Surnames{#3}% + \edef\Surnames{#3}% + \def\ISurnames{#3}% \if@nameauth@DoCaps% \def\Shortnames{\@nameauth@CapRoot{#3,}}% \else% @@ -113,44 +114,45 @@ \@nameauth@CheckComma{#3}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\ISurnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \fi% \IfValueTF{#2}% {\IfValueTF{#4}% - {\edef\Forenames{#4}}{\edef\Forenames{#2}}% + {\def\Forenames{#4}}{\def\Forenames{#2}}% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #2 #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \fi% \fi}% @@ -159,35 +161,35 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 #4 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 #4 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \else% \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \fi% \fi}% @@ -195,34 +197,34 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -231,11 +233,13 @@ } \DeclareDocumentCommand\FName{o m o}% {% - \def\Surnames{#2}% + \edef\Surnames{#2}% + \def\ISurnames{#2}% \if@nameauth@DoComma\else% \@nameauth@CheckComma{#2}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% + \def\ISurnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% \fi% \fi% \IfValueTF{#1}% @@ -244,29 +248,29 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #1 #2 cannot be a page reference.}% + {\bsc FName Cross-reference: #1 #2 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \fi% \fi}% @@ -275,27 +279,27 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc FName Cross-reference: #2 #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \fi% \fi}% @@ -303,26 +307,26 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 cannot be a page reference.}% + {\bsc FName Cross-reference: #2 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -336,11 +340,11 @@ \if@nameauth@DoComma\else% \@nameauth@CheckComma{#3}% \if@nameauth@Comma% - \edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \@nameauth@CheckComma{#5}% \if@nameauth@Comma% - \edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% + \def\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% \fi% \fi% \IfValueTF{#4}% @@ -376,11 +380,11 @@ \else% \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}% \IfValueTF{#2}% @@ -394,11 +398,11 @@ \else% \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5!PN!}}{}% \IfValueTF{#2}% @@ -446,15 +450,15 @@ {% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName XRef: #1 #2 exists.}% + {\bsc ExcludeName XRef: #1 #2 exists.}% \else% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% \fi% @@ -465,11 +469,11 @@ \else% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}% \fi% @@ -479,11 +483,11 @@ \else% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2!PN!}}{}% \fi% |