% \iffalse meta-comment % % Copyright (C) 2011 by Charles P. Schaum --------------------------------------------------------------------------- % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Charles P. Schaum. % % This work consists of the files nameauth.dtx and nameauth.ins % and the derived filebase nameauth.sty. % % \fi % % \iffalse %<*driver> \ProvidesFile{nameauth.dtx} % %\NeedsTeXFormat{LaTeX2e}[2005/12/01] %\ProvidesPackage{nameauth} %<*package> [2012/07/24 v1.4 name authority macros to aid consistent display and indexing of names] % % %<*driver> \documentclass{ltxdoc} \usepackage{ifxetex} \usepackage{ifluatex} \usepackage{ifpdf} \ifxetex \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text} \usepackage{xunicode} \usepackage{xltxtra} \else \ifluatex \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \else \usepackage[utf8]{inputenc} \usepackage[TS1,T1]{fontenc} \usepackage{newunicodechar} \usepackage{lmodern} \DeclareTextSymbolDefault{\textlongs}{TS1} \DeclareTextSymbol{\textlongs}{TS1}{115} \newunicodechar{ſ}{\textlongs} \newunicodechar{ā}{\=a} \newunicodechar{ṃ}{\d m} \fi \fi \usepackage{makeidx} \usepackage{multicol} \usepackage[toc]{multitoc} \usepackage{nameauth}[2012/07/24] \usepackage{hypdoc} \makeindex \frenchspacing \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{nameauth.dtx} \PrintChanges \PrintIndex \end{document} % % \fi % % \CheckSum{1206} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % % \changes{v0.7}{2011/12/26}{Initial version} % \changes{v0.75}{2012/01/19}{New features added and described} % \changes{v0.8}{2012/01/29}{Improved function and compatibility; added quick start guide} % \changes{v0.85}{2012/02/05}{Added comma suppression, new class options, and more functionality} % \changes{v0.86}{2012/02/06}{Fixed some regressions} % \changes{v0.9}{2012/02/10}{Added first name formatting; comma and suffix handling expandable} % \changes{v0.92}{2012/02/12}{Build with all major \LaTeX{} engines} % \changes{v0.94}{2012/02/15}{Added index suppression, error checking, name particle caps} % \changes{v0.95}{2012/02/17}{Bugfixes} % \changes{v0.96}{2012/02/19}{Bugfixes} % \changes{v1.0}{2012/02/20}{Works fully with \textsf{microtype} and \textsf{memoir}} % \changes{v1.1}{2012/03/08}{Fixed errors when emitting warnings} % \changes{v1.2}{2012/03/25}{Added tagging features; extensively edited documentation} % \changes{v1.22}{2012/04/20}{Attempted first-use particle caps} % \changes{v1.24}{2012/04/21}{Reverted functionality and suggested \cmd{\CapThis} workaround} % \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index} % \changes{v1.4}{2012/07/24}{Fixed issues moving argument problems, added several features} % % \DoNotIndex{\@empty, \@gobble, \@period, \@token, \protected@edef, \zap@space, \bfseries, \bgroup, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \expandafter, \fi, \Forenames, \futurelet, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase, \WithSuffix} % % \TagName{Louis}[the Pious]{, emperor}% % \TagName{Ptolemy I}[Soter]{, king}% % \TagName{Henry}[VIII]{, English king}% % \TagName{Charles}[the Bald]{, emperor}% % \TagName{Francis, I}{, French king}% % \TagName{Demetrius, I Soter}{, king}% % \TagName{Charles, V}{, emperor}% % \TagName{Louis, XIV}{, French king}% % \TagName{Leo, I}{, pope} % \TagName{Gregory, I}{, pope} % % \GetFileInfo{nameauth.dtx} % \title{The \textsf{nameauth} package} % \author{Charles P. Schaum \\ \texttt{charles dot schaum at att dot net}} % \date{\fileversion~from \filedate} % \maketitle % % \begin{abstract} % \noindent The \textsf{nameauth} package automates the formatting and indexing of names, facilitating the implementation of a \textbf{name authority}. This allows one to move blocks of text without retyping names, making it easier to go from drafts to a final manuscript. This package mainly supports Western names, with basic features for ancient, royal, and Eastern names. % \end{abstract} % % \tableofcontents % \clearpage % % \section{Introduction} % % Book-length studies can engage more than 500 different names. Editors and proofreaders cost money when checking those names. This package provides basic tools for consistently and automatically formatting names for the body text and the index. The goal is to reduce error, streamline work, and become a more cost-effective author. Features include: % \begin{multicols}{2} % \begin{itemize}\setlength\itemsep{0pt}\small % \item Format, print, and index names all at once. % \item Automatically print a full name the first time it appears, with full or shorter forms thereafter. % \item Automatically apply typesetting to names, recalling German \emph{Sperr\-druck}. % \item Rearrange text without retyping. % \item Allow predictable name variants in the text, yet index consistent name forms. % \item ``Tag'' and ``untag'' names in the index in order to index different people with the same name. % \item Macros can be used in the body text, in a \cmd{\marginpar}, in tabular material, and in list environments like \texttt{enumerate}, among others. % \end{itemize} % \end{multicols} % % \subsection{Design Notes and Thanks} % % This package depends on \textsf{etoolbox}, \textsf{suffix}, and \textsf{xargs}. As of version 1.4 it has been refactored extensively with robustness and modularity in mind. It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}. It will work with \textsf{makeindex} and \textsf{texindy}. This document 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}. % % Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance. The light of their knowledge banished the umbra of my ignorance. % % \subsection{Disclaimer} % This documentation uses names of historical figures because users refer to real people in their projects. At no time in this document am I intending either to promote, disparage, or make any assertions about any persons living or dead. All names mentioned herein deserve respect for the impact and legacy of their bearers. % \subsection{Caveat} % Throughout this manual I play a ``dirty trick'' that makes a name print as if it had not yet occurred. In some cases I make a first occurrence print as if the name already had occurred. This trick can be used, for example, to force the formatting of the first name in a chapter or section. See Section \ref{sec:Tweaks} for more. % \clearpage % % \section{Usage} % % \subsection{Package Options} % The defaults are \texttt{mainmatter}, \texttt{smallcaps}, \texttt{nocomma}, and \texttt{index}. The package begins immediately to format the first occurrences of names with small caps, suppressing commas between surnames and suffixes, and indexing all names in place. The following package options alter this behavior.\\ % % \begin{tabular}{lp{3.25in}} % & {\large\bfseries Enable/Disable Formatting}\\[0.5ex] % \texttt{mainmatter} & Enable formatting attributes (see below), starting at the beginning of a document.\\[1ex] % \texttt{frontmatter} & Disable formatting \emph{before} the invocation of \cmd{\NamesActive} while retaining automatic full and short forms. This option fits well, e.g., with a foreword from a contributor. See Section \ref{sec:SectionFormat}.\\[1ex] % & {\large\bfseries Show/Hide Suffix Commas}\\[0.5ex] % \texttt{nocomma} & Suppress commas between surnames and suffixes, following modern styles like \emph{Chicago Manual of Style}. Commas can be forced on a per-use basis with \cmd{\ShowComma}. See Section \ref{sec:suffix}.\\[1ex] % \texttt{comma} & Retain commas between all surnames and suffixes. This imposes limits on the use of certain macros.\\[1ex] % & {\large\bfseries Enable/Disable Indexing}\\[0.5ex] % \texttt{index} & Create index entries in place with the names.\\[1ex] % \texttt{noindex} & Prevent indexing before the invocation of the macro \cmd{\IndexActive}. See Section \ref{sec:SectionIndex}.\\[1ex] % & {\large\bfseries Formatting Attributes}\\[0.5ex] % \texttt{alwaysformat} & Disabled by default, this option can be used together with the options below. With the \texttt{mainmatter} option or after \cmd{\NamesActive}, always apply one of the predefined formatting options below or custom formatting (Section \ref{sec:formatting}). This is quite similar to using \emph{Sperr\-druck} in German to call out names.\\[1ex] % \texttt{smallcaps} & Set the first use of a name in small caps.\\[1ex] % \texttt{italic} & Italicize the first occurrence of a name.\\[1ex] % \texttt{boldface} & Set the first use of a name in boldface.\\[1ex] % \texttt{noformat} & This formatting option creates no special formatting, but it does not alter the formatting mechanism like the \texttt{frontmatter} option.\\ % \end{tabular} % \clearpage % % \subsection{Quick Start Guide} % \label{sec:start} % % This general section gets one using about 60\% of the package features right away. The seven basic patterns for names are:\\ % % \begin{small} % \begin{tabular}{ll} % \normalsize Pattern&\normalsize Restrictions\\ % \cmd{\Name}\oarg{Forenames}\marg{Surnames}\dotfill\hbox{}&\emph{none}\\ % \cmd{\Name}\oarg{Forenames}\marg{Surnames, Suffix}\dotfill\hbox{}&\texttt{comma}, \texttt{nocomma}\\ % \cmd{\Name}\oarg{Forenames}\marg{Surnames}\oarg{Nicknames}\dotfill\hbox{}&\emph{none}\\ % \cmd{\Name}\oarg{Forenames}\marg{Surnames, Suffix}\oarg{Nicknames}&\texttt{comma}, \texttt{nocomma}\\ % \cmd{\Name}\marg{Mononym}\dotfill\hbox{}&\emph{none}\\ % \cmd{\Name}\marg{Mononym, Suffix or Sobriquet}\dotfill\hbox{}&\texttt{comma}, \texttt{nocomma}\\ % \cmd{\Name}\oarg{Mononym}\oarg{Sobriquet}\dotfill\hbox{}&\cmd{\AKA} and \cmd{\PName}\\ % \end{tabular} % \end{small}\\[2ex] % The comma and nocomma options affect the appearance of names. That is especially true for the last two forms above. These patterns apply to all macros that accept a name form, with some restrictions. % % \subsubsection{Hints for Easier Usage} % \begin{tabular}{lp{4in}} % Q:&There is too much space between the initials in the names.\\[0.5ex] % A:&Bringhurst's \emph{Elements of Typographic Style} discourages full spaces between initials, calling for no spaces or thin spaces. Using \cmd{\frenchspacing} greatly simplifies related issues and it conforms with Bringhurst's guidelines.\\[1ex] % Q:&I see two index entries that are exactly the same!\\[0.5ex] % A:&As of version 1.4, the effect of spurious spaces in the printed names is negligible, but those spaces cause duplicate index entries. If you follow those entries to their pages, chances are that you will be able to track down the offending errors in short order.\\[1ex] % Q:&OK, you threw a bazillion macros at me, I used them all, and now I am Googling your personal info because I'm on a deadline and you will soon have a date with a Cyberman.\\[0.5ex] % A:&Hop in your TARDIS and leave a sticky note to yourself in the past to start just with \cmd{\Name} and spend a few pages breaking it in. See what happens in the index too. Use the other macros only when you need a function that the current ones are not fulfilling.\\[1ex] % Q:&|\Name[Davey]{Jones}[a Monkee]| shows ``a Monkee Jones.''\\[0.5ex] % A:&\cmd{\Name}\oarg{Forenames}\marg{Surnames}\oarg{Nickname} creates a nickname, not a sobriquet.\\[1ex] % Q:&I see ``Paragraph ended\dots'' or ``Missing \meta{grouping token} inserted'' and execution stops.\\[0.5ex] % A:&Check if the |{|braces|}| and |[|brackets|]| are balanced.\\[1ex] % \end{tabular} % % \begin{tabular}{lp{4in}} % Q:&|\Name[Henry]{VII}[Tudor]| prints either ``Tudor VII'' or ``VII''; |\FName[Henry]{VII}[Tudor]| prints either ``Tudor VII'' or ``Tudor.'' May I hurt you now?\\[0.5ex] % A:&The pattern \cmd{\Name}\oarg{King}\marg{Suffix} fails because even though authorities like Mulvany, \emph{Indexing Books} talk about optional surnames, it is far easier to encode royal names and mononyms as if they were surnames. Use either |\Name{Henry, VII}| with the \texttt{nocomma} option or |\Name{Henry}[VII]| with the \texttt{comma} option. Indicate that he was of House Tudor manually in the text and consider using something like |\TagName{Henry, VII}{ (Tudor)}| to indicate his house as part of the index entry.\\[1ex] % Q:&|\Name{Aethelred, the really}[Unreadig]| shows ``Aethelred the really Unreadig.''\\[0.5ex] % A:&Its index entry is messed up too. The form \cmd{\Name}\marg{Mononym, Suffix}\oarg{Sobriquet} creates two sobriquets, but badly. This is because the sobriquet feature of the final argument is best used with the \texttt{comma} option while the suffixed form is best used with the \texttt{nocomma} option. Mix them at your peril or at your whimsy.\\[1ex] % Q:&I tried |\AKA{Boris}[the Animal]{Just Boris}| and that went about as well as getting my head used as a bowling ball.\\[0.5ex] % A:&You cannot use \cmd{\AKA}\marg{Mononym}\oarg{Sobriquet}\dots\ because that would call for a macro with an ambiguous argument list that forces adding extra explicit arguments to work properly. Then you have to remember if you did or did not\,---\,or should or should not\,---\,add the explicit macro, and by that time the point of diminishing returns would have passed for both the package author and the package users. Sorry, but the manual solution is better. That also applies to the pattern \cmd{\AKA}\oarg{Forenames}\marg{Surnames}\oarg{Nicknames}\dots\ and the use of \cmd{\PName}.\\[1ex] % Q:&So how do I deal with some stage names and the like?\\[0.5ex] % A:&Use a forename or first initials to prevent failure:\\[0.5ex] % &OK: |\Name[J.]{Kreskin}[The Amazing]|\\&\qquad|\AKA[J.]{Kreskin}[Joseph]{Kresge}|\\[0.5ex] % &FAIL: |\Name{Kreskin}[The Amazing]|\\&\qquad|\AKA{Kreskin}[Joseph]{Kresge}|\\[1ex] % Q:&\cmd{\Name} has a full name in the source, but it is shorter in the text!\\[0.5ex] % A:&And you did not mean that to happen. Use \cmd{\Name*} in that case. It can be easy to forget that \cmd{\Name} can automatically shorten a reference even if you use the full name in the source text. Remember:\\[0.5ex] % &|\Name[John]{Smith}| gives \Name[John]{Smith}\\[0.5ex] % &|\Name[John]{Smith}| gives \Name[John]{Smith}\\[0.5ex] % &|\FName[John]{Smith}| gives \FName[John]{Smith}\ForgetName[John]{Smith}\\[1ex] % \end{tabular} % % \begin{tabular}{lp{4in}} % Q:&How do I refer to ``Iron Mike'' Tyson?\\[0.5ex] % A:&Very, very carefully. Use |``\Name[Mike]{Tyson}[Iron Mike]''| and |\SubvertName[Mike]{Tyson}\Name[Mike]{Tyson}| to produce the example above. Or create two separate names and cross-reference them manually in order to track them both in the index (see page \pageref{manualxref}). Or use |``\AKA[Mike]{Tyson}{Iron Mike}''| if you just want to cross-reference the main name.\\[1ex] % Q:&I had seen errors like ``Argument of |\Name| has an extra |}|''\\[0.5ex] % A:&Older versions of \texttt{nameauth} were susceptible to fragility and moving arguments. Version 1.4 and later of \textsf{nameauth} address many of these issues.\\[1ex] % \end{tabular} % \subsubsection{Error Handling} % \label{sec:error} % % Except for the indexing parts of macros, most of the macros in this package print any erroneous arguments in the text, but not in the index. To find errors, one can look at index entries for irregularities or examine package warnings. Unless there is a syntax error, all macros emit meaningful warnings. Convenience macros like \cmd{\PName} produces warnings via their component macros \cmd{\Name} and \cmd{\AKA}. % % Not all warnings are created equal. For example, the multiple creation of a cross-reference with \cmd{\AKA} will generate a warning, but it will have no ill effects and may be intentional. Other warnings, especially in the case of indexing macros, indicate that the macro produced no output.\\ % % \noindent Warnings result from: % % \begin{enumerate}\setlength{\itemsep}{-0.4ex} % \item Using a cross-reference \oarg{alternate FNN}\marg{alternate SNN}\oarg{alt. names} created by \cmd{\AKA} as a reference in \cmd{\Name}, \cmd{\FName}, and \cmd{\PName}. % \item Using a reference \oarg{FNN}\marg{SNN}\oarg{alternate names} created by \cmd{\Name}, \cmd{\FName}, and \cmd{\PName} as a cross-reference in \cmd{\AKA}. % \item Using \cmd{\AKA} to create the same cross-reference multiple times. % \item Using \cmd{\IndexName} to index a cross-reference as a main entry. % \item Using \cmd{\TagName} to tag a cross-reference. % \item Using \cmd{\ExcludeName} to exclude a name that has already been used. % \end{enumerate} % \clearpage % % \subsection{Naming Macros} % % \subsubsection{Surnames: \texttt{\textbackslash Name} and \texttt{\textbackslash Name*}} % % \DescribeMacro{\Name} % \DescribeMacro{\Name*} % This macro generates two forms of the name: a printed form in the text and a form of the name that occurs in the index. % The general syntax is: % \begin{quote} % \cmd{\Name}\oarg{forename(s)}\marg{surname(s)}\oarg{alternate names}\\ % \cmd{\Name*}\oarg{forename(s)}\marg{surname(s)}\oarg{alternate names} % \end{quote} % % \noindent From now on we will abbreviate \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN} at various points. The following table helps to show how the syntax description works with first and subsequent references: % % \begin{quote}\small % \begin{tabular}{ll}\hline % {\normalsize\strut}|\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\ % |\Name*[Albert]{Einstein}| & \Name*[Albert]{Einstein}\\ % |\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\\hline % {\normalsize\strut}|\Name{Confucius}| & \Name{Confucius}\\ % |\Name*{Confucius}| & \Name{Confucius}\\ % |\Name{Confucius}| & \Name*{Confucius}\\\hline % {\normalsize\strut}|\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]\\\hline % {\normalsize\strut}|\Name{Charles}[the Bald]| & \Name{Charles}[the Bald]\\ % |\Name*{Charles}[the Bald]| & \Name*{Charles}[the Bald]\\ % |\Name{Charles}[the Bald]| & \Name{Charles}[the Bald]\\\hline % \end{tabular} % \end{quote} % % \noindent \cmd{\Name} connects the \meta{FNN} to the \meta{SNN} to create respective printed and indexed forms, as illustrated in Section \ref{sec:PatRef} and thereafter. The invocation of \cmd{\Name} always prints the \meta{SNN} field. \cmd{\Name} prints the ``full name'' at the first occurrence, then only the partial form thereafter. \cmd{\Name*} always prints the full name. % % Nicknames and sobriquets of some historical figures are implemented in slightly different ways. A nickname assumes the presence of \meta{FNN} and \meta{SNN} (see the example for \Name[M.T.]{Cicero}[Marcus Tullius] above). The \meta{alternate names} field allows a nickname to replace the \meta{FNN} field in the text while keeping the \meta{FNN} field in the index. Nicknames are truly optional. As long as the \meta{FNN} and \meta{SNN} fields are consistent, the index entries will be consistent. The shorter name printed by \cmd{\Name} will not print forenames or nicknames. See also Section \ref{sec:start} and \cmd{\FName} below. % % In the example of \Name*{Charles}[the Bald] above, ``the Bald'' is not a nickname because no \meta{FNN} are present. In that case the \meta{alternate names} field is appended to the \meta{SNN} in both the printed form \emph{and} in the index form. This behavior implies that, while ``the Bald'' uses an optional parameter, it is not truly optional once used. % % Later we shall see that a similar effect, perhaps more preferable, can be achieved with the default \texttt{nocomma} option and |\Name{Charles, the Bald}|, as seen in Section \ref{sec:suffix}. One must always be consistent in using these forms. Otherwise one will get bogus index entries and errors in the text that are difficult to track. % \clearpage % % \subsubsection{Forenames: \texttt{\textbackslash FName}} % % \DescribeMacro{\FName} % \DescribeMacro{\FName*} % This casual friend of \cmd{\Name} prints only ``first'' names, but it will still print a full name when a first use occurs. \cmd{\FName} is intended for Western-style names. \cmd{\FName*} is only a synonym for \cmd{\FName}. The syntax is basically the same: % \begin{quote} % \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % The following table shows the output at a glance:\ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles}[the Bald] % % \begin{quote}\small % \begin{tabular}{ll}\hline % {\normalsize\strut}|\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\ % |\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\\hline % {\normalsize\strut}|\FName{Confucius}| & \FName{Confucius}\\ % |\FName{Confucius}| & \FName{Confucius}\\\hline % {\normalsize\strut} |\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\ % |\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\\hline % {\normalsize\strut} |\FName{Charles}[the Bald]| & \FName{Charles}[the Bald]\\ % |\FName{Charles}[the Bald]| & \FName{Charles}[the Bald]\\\hline % \end{tabular} % \end{quote} % % \noindent See how the first reference is a full name? That prevents an accidental reference to a first name before a person has been introduced. Nicknames are used by including them in the \meta{alternate names} field in addition to \meta{FNN}. For example, aviation hero \Name[Chesley B.]{Sullenberger, III} can be noted as: % % \begin{quote}|``\FName[Chesley B.]{Sullenberger, III}[Sully]''|\quad``\FName[Chesley B.]{Sullenberger, III}[Sully]''\end{quote} % %\noindent A good way to cut keystrokes would be to assign the above macro to the control sequence \cmd{\Sully}. With comma-delimited suffixes we note special cases governed by the \texttt{nocomma} package option (see Section \ref{sec:suffix}). These include names like like the fictional \FName[J.D.]{Rock, III} and the real \FName{Charles, V}: % \begin{quote}|\FName[J.D.]{Rock, III}|, ``\FName[J.D.]{Rock, III}''; |\FName{Charles, V}|, ``\FName{Charles, V}.''\end{quote} % \cmd{\FName} suppresses extra periods if a forename with initials occurs at the end of a sentence, as in |``who shot \FName[J.D.]{Rock, III}.''| ``who shot \FName[J.D.]{Rock, III}.'' % % \subsection{Advanced Naming Topics} % \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 \meta{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. \CapThis\Name{du Cange} (\AKA{du Cange}[Charles]{du Fresne}) would too, because \cmd{\CapThis} now works for all instances of \cmd{\Name} as of version 1.4. % % Names foreign to English usually put these particles in the \meta{FNN} field of \cmd{\Name}. Yet these particles are not first names. Using \cmd{\FName} with alternate forenames avoids that issue. See the examples starting on page \pageref{FirstVonLast}. % % \subsubsection{Hyphenation} % % I find it helpful to use respectively the \textsf{babel} or \textsf{polyglossia} packages with name hyphenation. If one is using English as the main language, the default hyphenation patterns may not suffice. For example, the name \Name[John]{Strietelmeier} may break thus: ``Stri-etelmeier.'' That is fixed by creating a \cmd{\de} macro equivalent to |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| (using \textsf{babel}) and writing |\de{\Name[John]{Strietelmeier}}|. % % One can insert optional hyphens in the arguments of \cmd{\Name} and friends but that must be done \emph{consistently} to avoid variants being treated as different names. % % \subsubsection{Suffixes and Non-Western Names} % \label{sec:suffix} % % \DescribeMacro{\ShowComma} % This package has two main settings: \texttt{comma} and \texttt{nocomma}. These settings are meant to accommodate different typesetting conventions. When using the default \texttt{nocomma} option, the user can force a comma to appear between the name and suffix in the \meta{SNN} field as appropriate by putting \cmd{\ShowComma} before \cmd{\Name} and friends, such as |\ShowComma\Name[Louis]{Gossett, Jr.}| \ShowComma\Name[Louis]{Gossett, Jr.}. %The \texttt{comma} option restricts the flexibility of expressing some royal names and basic Eastern names. \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms, but \cmd{\AKA} can cross-reference \emph{from} these forms in its second set of arguments. These restricted forms are shown below: % % \begin{quote}\ForgetName{Henry}[VIII] % \begin{tabular}{ll}\hline % {\normalsize\strut}|\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\ % |\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\\hline % {\normalsize\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\ % |\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\\hline % \end{tabular} % \end{quote} % % \noindent Again, alternate forenames \emph{override} the \meta{FNN} in the text. Sobriquets are \emph{appended} to \meta{SNN}. The presence or absence of \meta{FNN} triggers this difference between the two actions\,---\,\textbf{this is a central concept}. % %There is perhaps a less-confusing manner of working with such names. \cmd{\Name}\,---\,not \cmd{\Name*}\,---\,truncates comma-delimited suffixes from last names. For example, it prints the name \Name[Oskar]{Hammerstein, II} the first time and \Name[Oskar]{Hammerstein, II} thereafter. One must always use a comma to activate this, e.g., |\Name[Oskar]{Hammerstein, II}|. Spaces (or no spaces) between the comma and the suffix must remain consistent or else they will produce duplicate index entries. Extra space does not, however, affect the formatted output. % % Again, \textbf{the comma is essential to how this feature works}. Using, e.g., |\Name{Base, suff1, suff2}| for the \meta{SNN} argument yields: \IndexInactive \Name{Base, suff1, suff2}; then \Name{Base, suff1, suff2}.\IndexActive\ See how only the first comma is suppressed. % % These macros keep track of whether the name ends with the period of an abbreviation like ``Jr.'' and ``Sr.'' That should also work with abbreviations like ``d.\,\"{A}.'' (\textit{der \"{A}ltere}). Two periods are not printed when the full name is printed at the end of a sentence. The following example shows the combinations: % % \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.} % \begin{tabular}{ll} % |\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\ % |\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\ % |\Name[Martin Luther]{King, Jr.}| & \Name[Martin Luther]{King, Jr.} (e.g., in a sentence)\\ % |\Name*[Martin Luther]{King, Jr.}.| & \Name*[Martin Luther]{King, Jr.}.\\ % |\Name*[Martin Luther]{King, Jr.}| & \Name*[Martin Luther]{King, Jr.} % \end{tabular} % \end{quote} % Using the default package option \texttt{nocomma} with suffix removal, one can use the suffix feature to tweak more possibilities out of \cmd{\Name}. Instead of the sobriquet feature, one could use the following variants: % % \begin{quote}\ForgetName{Sun, Yat-sen} % \begin{tabular}{ll}\hline % {\normalsize\strut} |\Name{Louis, XIV}| & \Name{Louis, XIV}\\ % |\Name{Louis, XIV}| & \Name{Louis, XIV}\\\hline % {\normalsize\strut} |\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\ % |\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\\hline % \end{tabular} % \end{quote} % % \noindent The benefit to using this form is that one can type |\Name*{Louis, XIV}, the| |``\AKA{Louis, XIV}{Sun King}''| and get \Name*{Louis, XIV}, the ``\AKA{Louis, XIV}{Sun King}'' in the text with an appropriate reference from ``Sun King'' to ``Louis XIV'' in the index. The sobriquet feature would otherwise prevent such usage. % % Even though suffix and sobriquet features look like they produce the same \emph{output} in the body text using the \texttt{nocomma} option, they are internally \emph{different}. They will not respect each other regarding ``first use,'' although they will (tentatively) cooperate in the index. Use each approach consistently. An example of ``dangerous'' use of these features occurs in Section \ref{sec:formatting}. % % \subsubsection{Accented Names} % \label{sec:accents} % % If you use accented names, \textsf{xindy} (or \textsf{texindy}) are strongly recommended. The following Unicode characters are available using \textsf{inputenc}/\textsf{fontenc}: % \begin{quote} % \begin{tabular}{llll} % \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape first use \\ % À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ & second use \\[1ex] % \scshape Ò Ó Ô Õ Ö Ø & \scshape Ù Ú Û Ü Ý & \scshape Þ ß & \scshape first use \\ % Ò Ó Ô Õ Ö Ø & Ù Ú Û Ü Ý & Þ ß & second use \\[1ex] % \scshape à á â ã ä å æ & \scshape ç è é ê ë & \scshape ì í î ï ð ñ & \scshape first use \\ % à á â ã ä å æ & ç è é ê ë & ì í î ï ð ñ & second use \\[1ex] % \scshape ò ó ô õ ö ø & \scshape ù ú û ü ý & \scshape þ ÿ & \scshape first use \\ % ò ó ô õ ö ø & ù ú û ü ý & þ ÿ & second use \\[1ex] % \scshape Ă ă Ą ą Ć ć Č č & \scshape Ď ď Đ đ Ę ę Ě ě & \scshape Ğ ğ İ ı & \scshape first use \\ % Ă ă Ą ą Ć ć Č č & Ď ď Đ đ Ę ę Ě ě & Ğ ğ İ ı & second use \\[1ex] % \scshape IJ ij Ľ ľ Ł ł & \scshape Ń ń Ň ň Œ œ & \scshape Ŕ ŕ Ř ř & \scshape first use \\ % IJ ij Ľ ľ Ł ł & Ń ń Ň ň Œ œ & Ŕ ŕ Ř ř & second use \\[1ex] % \scshape Ś Ş ş Š š Ţ ţ Ť ť & \scshape Ů ů Ű ű & \scshape Ź ź Ż ż Ž ž & \scshape first use \\ % Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž & second use \\ % \end{tabular} % \end{quote} % %With \textsf{makeindex} there are a number of solutions, but some depend on the availability of the |-g| option and user-created settings in an |.ist| file whose description goes beyond the scope of this document. You also could use \cmd{\IndexActive} and \cmd{\IndexInactive} to suppress indexing, then create manual entries. For non-English documents, however, that solution is not optimal. % % One may use control sequences in \cmd{\Name} (thanks \Name*[Robert]{Schlicht}). That means more accents with NFSS, such as the next example that uses \textsf{inputenc}/\textsf{fontenc}: % \begin{quote}\small % |\usepackage{newunicodechar}|\\ % |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\ % |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\ % |\newunicodechar{ſ}{\textlongs}|\\ % |\newunicodechar{ā}{\=a}|\\ % |\newunicodechar{ṃ}{\d m}| % \end{quote} % For some situations, such as ``traditional'' NFSS, you will need fonts with TS1 glyphs, e.g., |\usepackage{lmodern}|. See the informative tables on pages 455--63 in \emph{The Latex Companion}. This allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghazāli}\IndexActive. % % In some cases, indexing accented names will fail unless you use \textsf{xetex} or \textsf{luatex}, both of which use \textsf{fontspec} instead of NFSS. Control sequences like |\=a| fail even in manual index entries when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is interpreted as a ``literal'' character, as mentioned by \Name[Dan]{Luecking}. I used |\IndexInactive\Name{Ghazāli}\IndexActive| to prevent the index entry ``ali'' sorted under ``Ghaz'' because even the manual entry fails in that case. % % It is important that this package work in the context of multiple languages. The use of multiple typesetting engines facilitates that. This snippet from the preamble to this file allows it to be typeset with multiple engines.\\ % % \begin{tabular}{ll} % |\usepackage{ifxetex}|\\ % |\usepackage{ifluatex}|\\ % |\ifxetex| & |% uses fontspec|\\ % \hbox{\quad}|\usepackage{fontspec}|\\ % \hbox{\quad}|\defaultfontfeatures{Mapping=tex-text}|\\ % \hbox{\quad}|\usepackage{xunicode}|\\ % \hbox{\quad}|\usepackage{xltxtra}|\\ % |\else|\\ % \hbox{\quad}|\ifluatex| & |% also uses fontspec|\\ % \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\ % \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\ % \hbox{\quad}|\else| & |% traditional NFSS|\\ % \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\ % \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\ % \hbox{\quad}|\fi|\\ % |\fi| % \end{tabular}\\ % \clearpage % % I used the following in the text itself to allow for conditional processing that helps one to document work under multiple engines:\\ % % \begin{tabular}{l} % |\ifxetex |\meta{xelatex text}|%|\\ % |\else%|\\ % \hbox{\quad}|\ifluatex%|\\ % \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{tabular} % % \subsubsection{Name Formatting} % \label{sec:formatting} % % \DescribeMacro{\NamesFormat} % The first instance of a name is formatted with \cmd{\NamesFormat} when formatting is active. Additionally, the \texttt{alwaysformat} option will cause every name to be formatted when formatting is active. In addition to using the package options, one can redefine \cmd{\NamesFormat} to create some custom effects. For example, if you wanted to suppress formatting in footnotes, you could do something like: % % \begin{quote} % |\makeatletter|\\ % |\let\@oldfntext\@makefntext|\\ % |\long\def\@makefntext#1{\def\NamesFormat{}\@oldfntext{#1}}|\\ % |\makeatother| % \end{quote} % % \noindent This approach synchronizes the ``first use'' feature in the text and the footnotes, but only suppresses the formatting. It takes advantage of the deep nesting of \cmd{\@makefntext} and a localized \cmd{\def} to make a temporary change. A second example puts the mention of first names in the margin if possible: % % \begin{quote} % |\let\oldformat\NamesFormat|\\ % |\renewcommand{\NamesFormat}[1]{\textbf{#1}%|\\ % |\ifinner\else\marginpar{\scriptsize #1}\fi}| % \end{quote} % The result produces something like: % % \begin{quote} % \let\oldformat\NamesFormat% % \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\scriptsize #1}\fi}% % \bgroup\small\ttfamily% % |\Name{Vlad III}[Dracula]| was known as Vlad Ţepeş, ``The Impaler,''\break after his death. He was the son of |\Name{Vlad II}%| |[Dracul]|, a\break member of the Order of the Dragon. Later references to\break |\Name{Vlad III}[Dracula]| appear thus.\egroup % % \Name{Vlad III}[Dracula] was known as Vlad Ţepeş, ``The Impaler,'' after his death. He was the son of \Name{Vlad II}[Dracul], a member of the Order of the Dragon. Later references to \Name{Vlad III}[Dracula] appear thus. % \end{quote} % % \noindent The forms above do not work with \cmd{\PName} and \cmd{\AKA}. Consistently use either the suffix mechanism (Section \ref{sec:suffix}) or see Section \ref{sec:pennames} regarding manual entries. If you use the suffix mechanism, you would use the following forms: % %\begin{quote}\ForgetName{Vlad III}[Dracula]\ForgetName{Vlad II}[Dracul] % \let\oldformat\NamesFormat% % \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\scriptsize #1}\fi}% % \bgroup\small\ttfamily% % |\Name{Vlad III, Dracula}| was known as |\AKA{Vlad III, Dracula}%|\break|{Vlad}[Ţepeş]|, |``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],''|\break after his death. He was the son of |\Name{Vlad II, Dracul}|, a\break member of the Order of the Dragon. Later references to\break |\Name{Vlad III, Dracula}| appear thus.\egroup % % \Name{Vlad III, Dracula} was known as \AKA{Vlad III, Dracula}% % {Vlad}[Ţepeş], ``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],'' after his death. He was the son of \Name{Vlad II, Dracul}, a member of the Order of the Dragon. Later references to \Name{Vlad III, Dracula} appear thus. % \end{quote} % % \noindent The redefinition of \cmd{\NamesFormat} given above follows scoping rules. Since I used it in a quote environment, it reverts to normal and now we have: \ForgetName{Vlad III}[Dracula]\Name{Vlad III}[Dracula]. Later references produce \Name{Vlad III}[Dracula]. The ``Dracula'' example was manipulated extensively with the tweaking macros \cmd{\ForgetName} and \cmd{\SubvertName}. Mixing the sobriquet and suffix forms otherwise might cause errors to ``bite.'' % % \subsubsection{Formatting Certain Sections} % \label{sec:SectionFormat} % % \DescribeMacro{\NamesActive} % \DescribeMacro{\NamesInactive} % Using the \texttt{frontmatter} option deactivates formatting until \cmd{\NamesActive} occurs. Another macro, \cmd{\NamesInactive}, will deactivate formatting again. These two macros toggle two independent systems of formatting and first use.\\ % % Here we switch to the ``front matter'' mode with \cmd{\NamesInactive}: % \NamesInactive % \begin{quote} % \begin{tabular}{ll} % |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\ % |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\ % |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\ %|\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\ % \end{tabular} % \end{quote} % % Then we switch back to ``main matter'' mode with \cmd{\NamesActive}: % \NamesActive % \begin{quote} % \begin{tabular}{ll} % |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\ % |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\ % |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\ %|\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\ % \end{tabular} % \end{quote} % %\noindent Notice that we have two independent cases of ``first use'' above. That is intended for different sections of the document, like front matter and main matter. It clashes on the same page. That is why you should suppress formatting in the main matter with a custom definition of \cmd{\NamesFormat} (Section \ref{sec:formatting}) instead of using \cmd{\NamesInactive}. The following section covers tweaks that help to minimize certain first-use clashes. % % \subsubsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}} % \label{sec:Tweaks} % % These two macros are meant for tweaking text at or near final draft stage. They affect both front matter and main matter. % % \DescribeMacro{\ForgetName} % This macro is a ``dirty trick'' of sorts that takes the same optional and mandatory parameters used by \cmd{\Name}. It handles its arguments in the same way, except that it ignores the final parameter if \meta{FNN} are present. The syntax is: % \begin{quote} % \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % % \noindent This macro causes \cmd{\Name} and friends to ``forget'' prior uses of a name with respect to typesetting. The next use will print as if it were a ``first use.'' Index entries and cross-references (see the next section) are \emph{never} forgotten. % % \DescribeMacro{\SubvertName} % This macro is the opposite of the one above. It takes the same parameters. It handles its arguments in the same manner. The syntax is: % \begin{quote} % \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % % \noindent This macro causes \cmd{\Name} and friends to think that a prior use of a name already has occurred. The next use will print as if it were a ``subsequent use.'' % % \subsection{Name Variant Macros} % \subsubsection{Introduction} % \label{sec:pennames} % % \cmd{\AKA} handles pseudonyms, stage names, \emph{noms de plume}, and so on. Before we examine \cmd{\AKA} in detail, we should cover the manual solution that \cmd{\AKA} helps to automate. If needed, the \texttt{.idx} file can be a helpful reference when linking manual entries with \textsf{nameauth} entries. This remains the only solution for certain cases, especially with the \texttt{comma} option: % % \begin{quote} % \bgroup\ttfamily\small % \verb+\index{Jean the Fearless|see{Jean sans Peur}}%+\\ % |\Name{Jean}[sans Peur]| (Jean the Fearless) reigned as Duke of\break Burgundy from 1404 to 1419. % \egroup % % \TagName{Jean}[sans Peur]{, duke}% % \index{Jean the Fearless|see{Jean sans Peur}}% % \Name{Jean}[sans Peur] (Jean the Fearless) reigned as Duke of Burgundy from 1404 to 1419. % \end{quote} % % \noindent The suffix workaround would use |\Name{Jean, sans Peur}| and the author need merely type |\AKA{Jean, sans Peur}{Jean the Fearless}|. See also Section \ref{sec:suffix}. Using \textsf{makeindex} also requires some manual entries: % \begin{quote} % \bgroup\ttfamily\small % \verb+\index{Doctor Angelicus@\textit{Doctor Angelicus}|see{Thomas Aquinas}}+ % \verb+\index{Thomas of Aquino|see{Thomas Aquinas}}+\\ % Perhaps the greatest medieval theologian was |\Name{Thomas}[Aquinas]| (Thomas of Aquino), also known as |\textit{Doctor Angelicus}|. His name ``Aquinas'' is not a surname. % \egroup % % \index{Doctor Angelicus=\textit{Doctor Angelicus}|see{Thomas Aquinas}} % \index{Thomas of Aquino|see{Thomas Aquinas}} % Perhaps the greatest medieval theologian was \Name{Thomas}[Aquinas] (Thomas of Aquino), also known as \textit{Doctor Angelicus}. His name ``Aquinas'' is not a surname. % \end{quote} % % \subsubsection{\texttt{\textbackslash AKA}} % \label{sec:AKA} % % \DescribeMacro{\AKA} % \DescribeMacro{\AKA*} % The primary macro that handles aliases is \cmd{\AKA}. Its syntax is: % \begin{quote} % \cmd{\AKA}\oarg{FNN}\marg{SNN}\oarg{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 The \meta{FNN} and \meta{SNN} arguments \emph{do not include} the final optional argument of \cmd{\Name} to avoid ambiguity. \cmd{\AKA} will not create a \emph{see} reference to a name that uses the \meta{alternate names} field. That must be done manually (see above). This macro is designed mainly with Western names in mind. % % \cmd{\AKA} only prints the alternate name, not the name to which it refers. It assumes that a \cmd{\Name} macro occurs somewhere to create the page-indexed target of a cross-reference. \textbf{No error checking} occurs for this. The macro also prevents double periods. Following is a quick review of what works and what fails for examples using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, and \Name{Gregory, I}: % % \begin{quote}\footnotesize % \begin{tabular}{ll}\hline % {\small\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\ % {\small\strut}\dag|\AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\\hline % {\small\strut}\ddag|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\ % {\small\strut}|\AKA{Louis}[XIV]{Sun King}| & FAIL\\\hline % {\small\strut}\S|\AKA{Gregory, I}{Gregory}[the Great]| & \AKA{Gregory, I}{Gregory}[the Great]\\ % {\small\strut}|\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\ % {\small\strut}|\AKA{Gregory}[I]{Gregory}[the Great]| & FAIL\\\hline % \end{tabular} % % \smallskip\dag{} This succeeds, but replaces ``Leslie Townes'' with ``Lester T.'' in the text, while keeping ``Hope, Leslie Townes'' as the \emph{see} reference in the index.\\ % \ddag{} This form uses the \texttt{nocomma} feature.\\ % \S{} This produces different output, depending on whether \cmd{\AKA} or \cmd{\AKA*} is used. % \end{quote} % % \noindent \cmd{\AKA} prints an alternate name and creates a cross reference in the index. The target of this cross-reference is either \meta{SNN}, \meta{FNN} or just \meta{SNN}. In the cross-reference, the \meta{alternate names} replace the \meta{alternate FNN} if both exist. Otherwise the \meta{alternate names} follow the \meta{alternate SNN}: % % \begin{quote} % \bgroup\ttfamily % Today we consider |\AKA[George]{Eliot}[Mary Anne]{Evans}| and her literary contributions as |\Name[George]{Eliot}|. % \egroup % % Today we consider \AKA[George]{Eliot}[Mary Anne]{Evans} and her literary contributions as \Name[George]{Eliot}. % \end{quote} % % \noindent If the starred form \cmd{\AKA*} is used with the template \meta{none}\meta{alternate SNN}\meta{alt. names}, it only prints the \meta{alt. names}. With the same template, \cmd{\AKA} prints \meta{alternate SNN} followed by \meta{alt. names}. Section \ref{sec:TagName} offers a complete presentation of related features. % % The cross-references generated by \cmd{\AKA} and \cmd{\AKA*} are meant to be \emph{see} references and thus the other macros in this package will not create page references for these cross-references. See also Section \ref{sec:error}. In certain cases, the alternate name might need to be indexed with page numbers. Do not use \cmd{\AKA} in those cases. Use \cmd{\Name} for both the main and the alternate names. Then, only after both instances of \cmd{\Name} have been invoked, create manual cross-references with \cmd{\index}, e.g.: % % \label{manualxref}% % \bgroup\footnotesize\label{Rambam} % \begin{tabular}{p{0.7in}ll}\hline % Authoritative Name & Alternate Name & Example of Use\\\hline % \Name{Maimonides} & \AKA{Maimonides}{Moses ben-Maimon} & |\Name{Maimonides}|\\ % &&|\AKA{Maimonides}{Moses ben-Maimon}|\\ % \Name{Maimonides} & \Name{Rambam} & |\Name{Rambam}%|\\& & \verb!\index{Rambam|seealso{Maimonides}}!\\\hline % \end{tabular} % \index{Rambam|seealso{Maimonides}}\egroup % % \bigskip\noindent\cmd{\AKA} will not create multiple instances of a cross-reference. This allows the macro \cmd{\ExcludeName} to work, but it also prevents the special case where one moniker applies to multiple people, e.g.: \PName*[Willebrord]{Snel van Royen}{Snellius} and his son \PName*[Rudolph]{Snel van Royen}{Snellius}. \cmd{\AKA} produces the first cross-reference; the user manually creates the second: % \index{Snellius|see{Snel van Royen, Rudolph}}% % \begin{quote} % \verb!\index{Snellius|see{Snel van Royen, Rudolph}}! % \end{quote} % % \subsubsection{\texttt{\textbackslash PName}} % % \DescribeMacro{\PName} % \cmd{\PName} is a ``convenience macro'' that sacrifices flexibility for simplicity. It uses only the \meta{FNN}\meta{SNN} use of \cmd{\AKA}. It does not use \cmd{\AKA*}. It is meant for Western-style names. It calls formats a Western-style ``main'' name followed by a cross-reference in parentheses. The syntax is: % \begin{quote} % \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{other FNN}\marg{other SNN}\oarg{other alt.} % \end{quote} % % \noindent The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. For example: % % \begin{quote}\footnotesize % \begin{tabular}{lp{1.3in}}\hline % {\normalsize\strut}|\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\ % |\PName*[Mark]{Twain}[Samuel L.]{Clemens}| & \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\ % |\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\\hline % {\normalsize\strut}|\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\ % |\PName*{Voltaire}[François-Marie]{Arouet}| & \PName*{Voltaire}[François-Marie]{Arouet}\\ % |\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\\hline % \end{tabular} % \end{quote} % % \subsection{Indexing Macros} % \subsubsection{\texttt{\textbackslash IndexName}} % % \DescribeMacro{\IndexName} % This macro creates an index entry like those created by \cmd{\Name} and friends. It prints no text in the body and permits no special formatting. The syntax is: % \begin{quote} % \cmd{\IndexName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % \cmd{\IndexName} does not index \meta{alternate names} unless \meta{FNN} are absent, whereupon it treats \meta{alternate names} as a sobriquet. If indexing is switched off (see Section \ref{sec:SectionIndex}), this macro does nothing. It will not create index entries for names that have been used as cross-references. % % \subsubsection{\texttt{\textbackslash TagName}} % \label{sec:TagName} % % \DescribeMacro{\TagName} % This macro creates a tag that will appear in all index entries corresponding to the name arguments from the point of invocation of \cmd{\TagName} onward. For consistency throughout the document, tag names at the beginning. The syntax is: % \begin{quote} % \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{alternate names}\marg{tag} % \end{quote} % \cmd{\TagName} and \cmd{\UntagName} handle their name arguments like \cmd{\IndexName}. Tags created by \cmd{\TagName} can be helpful in the indexes of history texts. Several features of this package are designed for historical research. Suppose you are working with medieval subject matter. The following macros come in handy:\\ % % \begin{tabular}{p{2in}p{2in}} % |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & Tag these names at the beginning of the document.\\ % \dots & \\ % |\Name{Leo, I}| |\Name{Gregory, I}| & First references to \Name{Leo, I} and \ForgetName{Gregory, I}\Name{Gregory, I}\\ % \dots & \\ % |\Name*{Leo, I} was known as| |\AKA{Leo, I}{Leo}[the Great].| & \Name*{Leo, I} was known as \AKA{Leo, I}{Leo}[the Great].\\ % \dots & \\ % |\Name{Gregory, I}| |``\AKA*{Gregory, I}%| |{Gregory}[the Great]''| & \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' was another major pope.\\ % \end{tabular}\\[1ex] % % \noindent \cmd{\TagName} causes tags in the index entries to be inserted automatically from the point of invocation. \cmd{\AKA} prints the name and the sobriquet, while \cmd{\AKA*} only prints the sobriquet. The tag is literal text; it can be comma-delimited, in parentheses, or whetever an author might want. % % \subsubsection{\texttt{\textbackslash UntagName}} % % \DescribeMacro{\UntagName} % This macro removes a tag created by \cmd{\TagName}. The syntax is: % \begin{quote} % \cmd{\UntagName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % \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}. By using these two commands, one can disambiguate different people with the same name. For example:\\ % % \begin{tabular}{p{2in}p{2in}} % |\ForgetName[John]{Smith}| |\TagName[John]{Smith}%| |{, the other one}| |\Name[John]{Smith}|\dots & This is the first reference to \ForgetName[John]{Smith}\TagName[John]{Smith}{, the other one}\Name[John]{Smith}, ``the other one'' in the index. Notice that it is tweaked.\\ % |\ForgetName[John]{Smith}| |\TagName[John]{Smith}%| |{, the third}| |\Name[John]{Smith}|\dots & This refers to \ForgetName[John]{Smith}\TagName[John]{Smith}{, the third}\Name[John]{Smith} ``the third'' in the index. It is tweaked again as a ``first occurrence.''\\ % |\SubvertName[John]{Smith}| |\UntagName[John]{Smith}| |\Name*[John]{Smith}| & This refers to the \SubvertName[John]{Smith}\UntagName[John]{Smith}\Name*[John]{Smith} in Section \ref{sec:start}. It is tweaked in order to force a subsequent reference.\\[1ex] % \end{tabular}\\ % % \noindent Tagging and untagging in this manner requires the author to juggle more info. With more freedom comes more responsibility. % % \subsubsection{\texttt{\textbackslash ExcludeName}} % % \DescribeMacro{\ExcludeName} % This prevents \cmd{\Name}, etc. from both formatting and indexing a specific name, but \emph{only if that name has not been used}. See also Section \ref{sec:error}. The syntax is: % \begin{quote} % \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{alternate names} % \end{quote} % To suppress only indexing but retain formatting, enclose \cmd{\Name}, etc. between \cmd{\IndexInactive} and \cmd{\IndexActive}. % % \subsubsection{Indexing Certain Sections} % \label{sec:SectionIndex} % % \DescribeMacro{\IndexActive} % \DescribeMacro{\IndexInactive} % Using the \texttt{noindex} option deactivates indexing until \cmd{\IndexActive} occurs. Another macro, \cmd{\IndexInactive}, will deactivate indexing again. These can be used throughout the document, independently of \cmd{\ExcludeName}. % % \subsubsection{Variant Spellings} % % Handling variant name spellings can be complicated, but one could create macros on a per-case basis to make it easier. For example, one might settle on the form \Name[W.E.B.]{Du Bois} in one's name authority. Yet an essay could use \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive, where the publisher would not grant the right to alter the spelling. In that case, do the following in that document section: % % \begin{enumerate}\setlength\itemsep{0pt} % \item In those cases where the only variation in the name is spacing (as above), you must call \cmd{\ForgetName} to generate a ``first use'' of the alternate spelling. The ``first use'' mechanism ignores spaces. % \item In all cases of the variant spelling, wrap \cmd{\Name} and friends between \cmd{\IndexInactive} and \cmd{\IndexActive}. A macro can do this easily. % \item Call \cmd{\IndexName} with the authoritative form right after \cmd{\IndexActive}. Again, this can be part of a macro. % \end{enumerate} % This looks cumbersome, but it ensures accuracy. It cannot be reduced to an all-purpose macro because that would generate an ambiguous argument list. It should only be used in those cases where minor variations in spelling do not cause the reader to question the identity of the person in question. % % \subsection{Naming Pattern Reference} % \label{sec:PatRef} % \subsubsection{Basic Naming} % \begin{multicols}{2}\small % \noindent The macro used most often is \cmd{\Name}, but we list the starred form first here because it always produces the fullest name form. When referring to a name for the first time, the following macros have the same result: % \begin{enumerate}\setlength\itemsep{0pt} % \item First reference: \ForgetName[John]{Smith}\Name[John]{Smith}\\[0.5ex] % |\Name*[John]{Smith}| or\\ |\Name[John]{Smith}| or\\ |\FName[John]{Smith}| % \item First mononym reference: \ForgetName{Plato}\Name{Plato}\\[0.5ex] % |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}| % \end{enumerate} % Subsequent references to names have a different format depending on the macro used: % \begin{enumerate}\addtocounter{enumi}{2}\setlength\itemsep{0pt} % \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 Subsequent mononym: \Name{Plato}\\[0.5ex] % |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}| % \end{enumerate} % These examples show printing of alternate forenames, keeping the same name in the index. They use both the first and final optional parameters of \cmd{\Name} and friends. % \begin{enumerate}\addtocounter{enumi}{6}\setlength\itemsep{0pt}\small % \item Long first ref: \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 Different forenames, same surname: \Name*[J.Q.]{Public}[Jane Qetsiyah]\\[0.5ex] % {\footnotesize |\Name*[J.Q.]{Public}[Jane Qetsiyah]|} % \item Subsequent name: \Name*[J.Q.]{Public}\\[0.5ex] % |\Name*[J.Q.]{Public}| % \item Alternate forename: \FName[J.Q.]{Public}[Janie]\\[0.5ex] % |\FName[J.Q.]{Public}[Janie]| % \end{enumerate} % These next examples work with or without the \texttt{comma} option. \cmd{\AKA} and \cmd{\PName} cannot cross-reference these forms. Page \pageref{sec:Intermediate}, Section \ref{sec:suffix}, and Section \ref{sec:pennames} address this issue with different solutions. % \begin{enumerate}\addtocounter{enumi}{10}\setlength\itemsep{0pt} % \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]|\columnbreak % \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]| % \end{enumerate} % \end{multicols} % % \subsubsection{Suffixes} % \label{sec:Intermediate}% % \begin{multicols}{2}\small % \noindent Always use a comma to delimit suffixes. \cmd{\AKA} and \cmd{\PName} will cross-reference these forms. See also Section \ref{sec:suffix}. Macros that are too wide for the column are split using the comment token for readability. % \begin{enumerate}\setlength\itemsep{0pt} % \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]| % \end{enumerate} % The next cases depend on the default \texttt{nocomma} option, whereby one can use comma suppression to implement forms of ancient, royal and Eastern names. \cmd{\AKA} and \cmd{\PName} will cross-reference these forms. % % Cf. the reference to \Name{Ptolemy I}[Soter] (above). Using |\Name{Demetrius, I Soter}| keeps the number with the suffix. To keep the number with the name, use |\Name{Demetrius I, Soter}|.\columnbreak % \begin{enumerate}\addtocounter{enumi}{4}\setlength\itemsep{0pt} % \item First reference: \ForgetName{Francis, I}\Name{Francis, I}\\[0.5ex] % |\Name*{Francis, I}| or\\ |\Name{Francis, I}| or\\ |\FName{Francis, I}| % \item Subsequent full name: \Name*{Francis, I}\\[0.5ex] % |\Name*{Francis, I}| % \item Subsequent name: \Name{Francis, I}\\[0.5ex] % |\Name{Francis, I}| or\\ |\FName{Francis, 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}| % \end{enumerate} % \end{multicols} % % \subsubsection{Particles} % \begin{multicols}{2}\small % \noindent The following illustrate the American style of particulate names. % \begin{enumerate}\setlength\itemsep{0pt} % \item First: \ForgetName[Walter]{de la Mare}\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}| % \end{enumerate} % \label{FirstVonLast} % The Continental style differs slightly. Forms 5--7 put the particles in the index. Forms 8--11 use the nickname feature to omit the particles from the index. Long macros are split for readability. % \begin{enumerate}\addtocounter{enumi}{4}\setlength\itemsep{0pt} % \item The (admittedly long) first use:\\\Name[Johann Wolfgang von]{Goethe}\\[0.5ex] % |\Name*[Johann Wolfgang von]%|\\|{Goethe}| or\\ |\Name[Johann Wolfgang von]%|\\|{Goethe}| or\\ |\FName[Johann Wolfgang von]%|\\|{Goethe}| % \item Subsequent: \Name[Johann Wolfgang von]{Goethe}\\[0.5ex] % |\Name[Johann Wolfgang von]%|\\|{Goethe}| % \item Forenames: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang]\\[0.5ex] % |\FName[Johann Wolfgang von]%|\\ |{Goethe}[Johann Wolfgang]| % \item First: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex] % |\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]| % \item Subsequent surname: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex] % |\Name[Adolf]{Harnack}[Adolf von]| or |\Name[Adolf]{Harnack}| % \item Subsequent forename: \FName[Adolf]{Harnack}\\[0.5ex] % |\FName[Adolf]{Harnack}| % \end{enumerate} % \end{multicols} % \clearpage % % \StopEventually{\PrintChanges\clearpage\PrintIndex} % % \section{Implementation} % % \iffalse %<*package> % \fi % \subsection{Package Options and Required Packages} % % \begin{macrocode} \newif\if@nameauth@FullName \newif\if@nameauth@FirstName \newif\if@nameauth@AltAKA % \end{macrocode} % Used internally to control printed name forms. |@nameauth@FullName| is only used to decide long or short forms in subsequent occurrences of names. The next Boolean, |@nameauth@FirstName|, switches surnames and forenames in the short form. |@nameauth@AltAKA| determines the cross-references that \cmd{\AKA} will print.\\ % % \begin{macrocode} \newif\if@nameauth@DoFormat \newif\if@nameauth@DoIndex \newif\if@nameauth@AlwaysFormat \newif\if@nameauth@ShowComma % \end{macrocode} % These Boolean values control formatting. The first two can be toggled with \cmd{\NamesActive} and \cmd{\NamesInctive}, as well as \cmd{\IndexActive} and \cmd{\IndexInctive}. The first three are set with package options. The last is set with \cmd{\ShowComma} and cleared by \cmd{\Name} and friends.\\ % % \begin{macrocode} \newif\if@nameauth@Comma \newif\if@nameauth@Punct % \end{macrocode} % These Boolean values are used internally for detection of suffixes and final periods.\\ % % \begin{macrocode} \newif\if@nameauth@DoCaps % \end{macrocode} % This Boolean triggers capitalization in \cmd{\Name} of particles like \emph{de la} that may occur at the start of a sentence. It is triggered with \cmd{\CapThis}.\\ % % \begin{macrocode} \DeclareOption{mainmatter}{\@nameauth@DoFormattrue} \DeclareOption{frontmatter}{\@nameauth@DoFormatfalse} \DeclareOption{smallcaps}{\newcommand{\NamesFormat}{\scshape}} \DeclareOption{italic}{\renewcommand{\NamesFormat}{\itshape}} \DeclareOption{boldface}{\renewcommand{\NamesFormat}{\bfseries}} \DeclareOption{noformat}{\renewcommand{\NamesFormat}{}} \DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue} \DeclareOption{comma}{\protected@edef\Interspace{,\space}} \DeclareOption{nocomma}{\protected@edef\Interspace{\space}} \DeclareOption{index}{\@nameauth@DoIndextrue} \DeclareOption{noindex}{\@nameauth@DoIndexfalse} \ExecuteOptions{smallcaps,mainmatter,nocomma,index} \ProcessOptions\relax \RequirePackage{etoolbox} \RequirePackage{suffix} \RequirePackage{xargs} % \end{macrocode} % The options above interact with the prior Boolean values. Suppressing and showing commas is set at load time and should not be changed in the document or else significant errors will result. Most options can be changed with user interface macros. Avoid changing the internal Boolean values directly.\\ % % \subsection{Internal Macros} % \begin{macro}{\@nameauth@CleanName} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} % \begin{macrocode} \newcommand*{\@nameauth@CleanName}[1]% {% \expandafter\zap@space\detokenize{#1} \@empty% } % \end{macrocode} % \end{macro} % Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string based on the forename/surname parameters of \cmd{\Name} and friends. With this we can construct a control sequence name. Testing for the presence of that control sequence determines the existence of pseudonyms and the first occurrence of a name.\\ % % The following macros parse a ``base'' name into a radix and a suffix. They are designed so that their function occurs at the time of macro expansion, not execution. This expandability is key to the proper indexing function of this package. They form the kernel of the suffix removal and comma suppression features. % % \begin{macro}{\@nameauth@Root} % \changes{v0.85}{2012/02/05}{Revise suffix handling} % \changes{v0.9}{2012/02/10}{renamed macro; suffix handling expandable} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \newcommand*{\@nameauth@Root}[1]% {% \@nameauth@TrimRoot#1,\@empty\relax% } % \end{macrocode} % \end{macro} % Anything starting with a comma and ending with the end of the name is stripped off. That includes ``Sr.,'' ``Jr.,'' ``III,'' and so on. % % \begin{macro}{\@nameauth@TrimRoot} % \changes{v0.85}{2012/02/05}{Divide suffix handling into functional parts} % \changes{v0.9}{2012/02/10}{Renamed macro; suffix handling expandable} % \begin{macrocode} \def\@nameauth@TrimRoot#1,#2\relax{#1} % \end{macrocode} % \end{macro} % This delimited-parameter macro strips off the second parameter as it returns the first. % % \begin{macro}{\@nameauth@CapRoot} % \changes{v0.95}{2012/02/17}{Added macro} % \begin{macrocode} \newcommand*{\@nameauth@CapRoot}[1]% {% \@nameauth@CR#1\relax% } % \end{macrocode} % \end{macro} % This macro implements the particulate name capitalization mechanism. % % \begin{macro}{\@nameauth@CR} % \changes{v0.95}{2012/02/17}{Added macro} % \begin{macrocode} \def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}} % \end{macrocode} % \end{macro} % This delimited-parameter macro caps the first parameter and strips suffixes off the second. % % \begin{macro}{\@nameauth@Suffix} % \changes{v0.9}{2012/02/10}{added macro} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \newcommand*{\@nameauth@Suffix}[1]% {% \@nameauth@TrimSuffix#1\relax% } % \end{macrocode} % \end{macro} % Anything before a comma is stripped off by |\@nameauth@Suffix|, but it should be called only in a conditional where one knows that a comma will be present. % % \begin{macro}{\@nameauth@TrimSuffix} % \changes{v0.9}{2012/02/10}{added macro} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \def\@nameauth@TrimSuffix#1,#2\relax{#2} % \end{macrocode} % \end{macro} % This delimited-parameter macro strips the first parameter and returns the second.\\ % % The next macros check whether the next token is a period. They are only called if the terminal character produced within \cmd{\Name} and \cmd{\FName} is itself a period. % % \begin{macro}{\@nameauth@CheckDot} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} % \begin{macrocode} \def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot} % \end{macrocode} % \end{macro} % This macro assigns the lookahead token \cmd{\@token} to be evaluated by\break \cmd{\@nameauth@EvalDot} while keeping \cmd{\@token} non-destructively on the list of input tokens. This does not gobble spaces like \cmd{\@nextchar}. % % \begin{macro}{\@nameauth@EvalDot} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} % \begin{macrocode} \def\@nameauth@EvalDot% {% \let\@period=.\ifx\@token\@period\expandafter\@gobble \fi% } % \end{macrocode} % \end{macro} % \cmd{\@nameauth@EvalDot} checks if \cmd{\@token} is a period. If so it gobbles it by using \cmd{\expandafter} to get past the grouping. Another \cmd{\expandafter} occurs immediately before the invocation of \cmd{\@nameauth@CheckDot} in \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA}. % % \begin{macro}{\@nameauth@TestDot} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} % \begin{macrocode} \newcommand*{\@nameauth@TestDot}[1]% {% \def\TestDot##1.\TestEnd##2\TestStop{\TestPunct{##2}}% \def\TestPunct##1% {\ifx\TestPunct##1\TestPunct\else\@nameauth@Puncttrue\fi}% \@nameauth@Punctfalse% \TestDot#1\TestEnd.\TestEnd\TestStop% } % \end{macrocode} % \end{macro} % While \cmd{\@nameauth@CheckDot} looks \emph{ahead} for a period, \cmd{\@nameauth@TestDot}\,---\,based on a snippet by \Name*[Uwe]{Lueck}\,---\,checks for a terminal period in the name passed to it, ignoring medial periods. It always resets the Boolean value before making its test, making it unnecessary to reset elsewhere.\\ % % The following macros format the output for \cmd{\Name} and friends. The intent is to separate formatting in modular fashion from name parsing. % % \begin{macro}{\@nameauth@FmtName} % \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility} % \changes{v0.85}{2012/02/05}{Add comma suppression} % \changes{v0.9}{2012/02/10}{Redesigned macro} % \changes{v0.94}{2012/02/15}{Added particle caps} % \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}} % \begin{macrocode} \newcommand{\@nameauth@FmtName}[1]% {% \@nameauth@TestDot{#1}% \if@nameauth@DoFormat% \bgroup\NamesFormat{#1}\egroup% \else% #1% \fi% } \WithSuffix\newcommand\@nameauth@FmtName*[1]% {% \@nameauth@TestDot{#1}% \if@nameauth@DoFormat% \if@nameauth@AlwaysFormat% \bgroup\NamesFormat{#1}\egroup% \else% #1% \fi% \else% #1% \fi% } % \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 conditional |\if@nameauth@AlwaysFormat| causes formatting to occur always (when possible). % % \begin{macro}{\@nameauth@Index} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} \newcommandx\@nameauth@Index[2][2=\@empty]% {% \ifx#2\@empty% \if@nameauth@DoIndex\index{#1}\fi% \else% \ifcsname#2\endcsname% \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi% \else% \if@nameauth@DoIndex\index{#1}\fi% \fi% \fi% } % \end{macrocode} % \end{macro} % If the indexing flag is true, create an index entry, otherwise do nothing.\clearpage % % \subsection{User Interface Macros} % % \begin{macro}{\CapThis} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} \newcommand{\CapThis}% {% \@nameauth@DoCapstrue% } % \end{macrocode} % \end{macro} % Force the capitalizing of particles. This affects the next occurrence of \cmd{\Name}, which then turns off the forced caps. % % \begin{macro}{\ShowComma} % \changes{v1.4}{2012/07/24}{Added macro} % \begin{macrocode} \newcommand{\ShowComma}% {% \@nameauth@ShowCommatrue% } % \end{macrocode} % \end{macro} % Force a comma between a name and a suffix on a per-issue basis. % % \begin{macro}{\Name} % \changes{v0.75}{2012/01/19}{Added ``sobriquet'' feature} % \changes{v0.8}{2012/01/29}{Merged all major functionality here} % \changes{v0.85}{2012/02/05}{Add comma suppression to indexing} % \changes{v0.9}{2012/02/10}{Redesigned macro} % \changes{v0.94}{2012/02/15}{Error checking expanded} % \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}} % \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.} % \changes{v1.0}{2012/02/20}{Fixed compatibility issues.} % \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \newcommandx\Name[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \leavevmode\hbox{}% \if@nameauth@ShowComma% \protected@edef\Space{,\space}% \else% \let\Space\Interspace% \fi% \protected@edef\RawSurnames{#2}% \protected@edef\RawShort{\@nameauth@Root{#2}}% \protected@edef\CapShort{\@nameauth@CapRoot{#2}}% \let\IndexShort\RawShort% \let\IndexSurnames\RawShort% \ifx\RawSurnames\RawShort% \protected@edef\Suffix{\@empty}% \if@nameauth@DoCaps% \let\Surnames\CapShort% \let\PrintShort\CapShort% \else% \let\Surnames\RawShort% \let\PrintShort\RawShort% \fi% \else% \protected@edef\Suffix{\ignorespaces\@nameauth@Suffix{#2}}% \protected@edef\IndexSurnames{\RawShort\Space\Suffix}% \if@nameauth@DoCaps% \protected@edef\Surnames{\CapShort\Space\Suffix}% \let\PrintShort\CapShort% \else% \protected@edef\Surnames{\RawShort\Space\Suffix}% \let\PrintShort\RawShort% \fi% \fi% \@nameauth@DoCapsfalse% \@nameauth@ShowCommafalse% \ifx\testi\@empty% \ifx\testiii\@empty% \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \Name: Xref: #2 cannot be a page reference.}% \else% \@nameauth@Index{\IndexSurnames}[\@nameauth@CleanName{#2}]% \fi% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \PackageWarning{nameauth}% {macro \Name: Xref: #2 #3 cannot be a page reference.}% \else% \@nameauth@Index{\IndexSurnames\space#3}[\@nameauth@CleanName{#2#3}]% \fi% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Surnames\expandafter\space#3}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Surnames\expandafter\space#3}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Surnames\expandafter\space#3}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Surnames\expandafter\space#3}% \fi% \fi% \fi% \else% \ifx\testiii\@empty% \protected@edef\Forenames{#1}% \else% \protected@edef\Forenames{#3}% \fi \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \Name: Xref: #1 #2 cannot be a page reference.}% \else% \ifx\Suffix\@empty% \@nameauth@Index{\IndexShort, #1}[\@nameauth@CleanName{#1#2}]% \else% \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}]% \fi% \fi% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \let\PrintShort\Forenames% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \if@nameauth@FirstName% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \let\PrintShort\Forenames% \fi% \if@nameauth@FullName% \@nameauth@FullNamefalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \else% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \fi% \else% \@nameauth@FullNamefalse% \@nameauth@FirstNamefalse% \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% \fi% \fi% \fi% \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi% } % \end{macrocode} % \end{macro} % % \begin{macro}{\Name*} % \changes{v1.4}{2012/07/24}{Refactored} % \begin{macrocode} \WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]% {% \@nameauth@FullNametrue% \Name[#1]{#2}[#3]% } % \end{macrocode} % \end{macro} % \cmd{\Name} is the heart of this package. \Name*[Marc van]{Dongen} provided the basic structure. The present version has been refactored to isolate indexing and parsing. Macros have been redesigned to be smaller, more efficient, and more robust. % % The present version of \cmd{\Name} incorporates \cmd{\FName} as well. % % The use of \cmd{\expandafter} before \cmd{\@nameauth@CheckDot} works with the other use of \cmd{\expandafter} mentioned with \cmd{\@nameauth@EvalDot} above to move past the closing brace and fetch the period as lookahead. That is only done when the check for a terminal period in the name succeeds. % % \begin{macro}{\FName} % \changes{v0.9}{2012/02/10}{Added macro} % \changes{v0.94}{2012/02/15}{Error checking expanded} % \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.} % \changes{v1.0}{2012/02/20}{Fixed compatibility issues.} % \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index} % \changes{v1.4}{2012/07/24}{Refactored} % \begin{macrocode} \newcommandx\FName[3][1=\@empty, 3=\@empty]% {% \@nameauth@FirstNametrue% \Name[#1]{#2}[#3]% } % \end{macrocode} % \end{macro} % % \begin{macro}{\FName} % \changes{v1.4}{2012/07/24}{Refactored} % \begin{macrocode} \WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]% {% \@nameauth@FirstNametrue% \Name[#1]{#2}[#3]% } % \end{macrocode} % \end{macro} % \cmd{\FName} and \cmd{\FName*} are identical and derived from \cmd{\Name} using it to print forename(s) in a subsequent use. % % \begin{macro}{\AKA} % \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility} % \changes{v0.86}{2012/02/06}{Fixed some regressions} % \changes{v0.9}{2012/02/10}{Added starred mode; redesigned} % \changes{v0.94}{2012/02/15}{Added error checking} % \changes{v1.0}{2012/02/20}{Fixed compatibility issues.} % \changes{v1.1}{2012/03/08}{Fixed warning reporting.} % \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \newcommandx\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \protected@edef\testv{#5}% \leavevmode\hbox{}% \if@nameauth@ShowComma% \protected@edef\Space{,\space}% \else% \let\Space\Interspace% \fi% \protected@edef\RawSurnamesi{#2}% \protected@edef\RawSurnamesii{#4}% \protected@edef\Shorti{\@nameauth@Root{#2}}% \protected@edef\Shortii{\@nameauth@Root{#4}}% \ifx\RawSurnamesi\Shorti% \let\Surnamesi\Shorti% \protected@edef\Suffixi{\@empty}% \else% \protected@edef\Suffixi{\ignorespaces\@nameauth@Suffix{#2}}% \protected@edef\Surnamesi{\Shorti\Space\Suffixi}% \fi% \ifx\RawSurnamesii\Shortii% \let\Surnamesii\Shortii% \protected@edef\Suffixii{\@empty}% \else% \protected@edef\Suffixii{\ignorespaces\@nameauth@Suffix{#4}}% \protected@edef\Surnamesii{\Shortii\Space\Suffixii}% \fi% \@nameauth@ShowCommafalse% \ifx\testiii\@empty% \ifx\testv\@empty% \ifcsname\@nameauth@CleanName{#4!PN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: XRef: #4 exists.}% \else% \ifcsname\@nameauth@CleanName{#4!MN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #4 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #4 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#4!PN!}}{}% \ifx\testi\@empty% \@nameauth@Index{\Surnamesii|see{\Surnamesi}}% \else% \ifx\Suffixi\@empty \@nameauth@Index{\Surnamesii|see{\Surnamesi, #1}}% \else\@nameauth@Index{\Surnamesii|see{\Shorti, #1, \Suffixi}}\fi% \fi% \fi% \fi% \fi% \@nameauth@AltAKAfalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}% \else% \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: XRef: #4 #5 exists.}% \else% \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #4 #5 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #4 #5 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}% \ifx\testi\@empty% \@nameauth@Index{\Surnamesii\space#5|see{\Surnamesi}}% \else% \ifx\Suffixi\@empty \@nameauth@Index{\Surnamesii\space#5|see{\Surnamesi, #1}}% \else\@nameauth@Index{\Surnamesii\space#5|see{\Shorti, #1, \Suffixi}}\fi% \fi% \fi% \fi% \fi% \if@nameauth@AltAKA% \@nameauth@AltAKAfalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{#5}% \else% \@nameauth@AltAKAfalse% \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii\space#5}% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: XRef: #3 #4 exists.}% \else% \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #3 #4 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname% \PackageWarning{nameauth}% {macro \AKA: Name reference: #3 #4 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#3#4!PN!}}{}% \ifx\testi\@empty% \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesii, #3|see{\Surnamesi}}% \else\@nameauth@Index{\Shortii, #3, \Suffixii|see{\Surnamesi}}\fi% \else% \ifx\Suffixi\@empty% \ifx\Suffixii\@empty% \@nameauth@Index{\Surnamesii, #3|see{\Surnamesi, #1}}% \else% \@nameauth@Index{\Shortii, #3, \Suffixii|see{\Surnamesi, #1}}% \fi% \else% \ifx\Suffixii\@empty% \@nameauth@Index{\Surnamesii, #3|see{\Shorti, #1, \Suffixi}}% \else% \@nameauth@Index{\Shortii, #3, \Suffixii|see{\Shorti, #1, \Suffixi}}% \fi% \fi% \fi% \fi% \fi% \fi% \@nameauth@AltAKAfalse% \ifx\testv\@empty% \protected@edef\Forenames{#3}% \else% \protected@edef\Forenames{#5}% \fi% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnamesii}% \fi% \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi% } \WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]% {% \@nameauth@AltAKAtrue% \AKA[#1]{#2}[#3]{#4}[#5]% } % \end{macrocode} % \end{macro} % \cmd{\AKA} prints a pseudonym and creates index cross-references. Its starred form prints only the alternate name parameter, if that exists. It prevents multiple generation of cross-references and suppresses double periods. % % \begin{macro}{\PName} % \changes{v0.85}{2012/02/05}{Add comma suppression} % \begin{macrocode} \newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]% {% \Name[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])% } \WithSuffix\newcommandx\PName*[5][1=\@empty,3=\@empty,5=\@empty]% {% \Name*[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])% } % \end{macrocode} % \end{macro} % \cmd{\PName} is a convenience macro whose starred and unstarred forms call the respective versions of \cmd{\Name}, followed only by \cmd{\AKA}. % % \begin{macro}{\TagName} % \changes{v1.2}{2012/02/25}{Added macro.} % \begin{macrocode} \newcommandx\TagName[4][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \ifx\testi\@empty% \ifx\testiii\@empty% \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \textbackslash TagName Cannot tag xref: #2.}% \else% \csgdef{\@nameauth@CleanName{#2}}{#4}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \PackageWarning{nameauth}% {macro \textbackslash TagName Cannot tag xref: #2 #3.}% \else% \csgdef{\@nameauth@CleanName{#2#3}}{#4}% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \textbackslash TagName Cannot tag xref: #1 #2.}% \else% \csgdef{\@nameauth@CleanName{#1#2}}{#4}% \fi% \fi% } % \end{macrocode} % \end{macro} % \cmd{\TagName} creates an index entry tag after a name that is not already a pseudonym. % % \begin{macro}{\UntagName} % \changes{v1.2}{2012/02/25}{Added macro.} % \begin{macrocode} \newcommandx\UntagName[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \ifx\testi\@empty% \ifx\testiii\@empty% \csundef{\@nameauth@CleanName{#2}}% \else% \csundef{\@nameauth@CleanName{#2#3}}% \fi% \else% \csundef{\@nameauth@CleanName{#1#2}}% \fi% } % \end{macrocode} % \end{macro} % \cmd{\TagName} creates an index entry tag after a name that is not already a pseudonym. % % \begin{macro}{\IndexName} % \changes{v0.75}{2012/01/19}{Optional parameter added; mandatory parameter deleted} % \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility} % \changes{v0.86}{2012/02/06}{Slight tweak using \cmd{\edef}} % \changes{v0.9}{2012/02/10}{redesigned macro} % \changes{v1.0}{2012/02/20}{Fixed compatibility issues.} % \changes{v1.2}{2012/02/25}{Added warnings.} % \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index} % \changes{v1.4}{2012/07/24}{Made more robust} % \begin{macrocode} \newcommandx\IndexName[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \if@nameauth@ShowComma% \protected@edef\Space{,\space}% \else% \let\Space\Interspace% \fi% \protected@edef\RawSurnames{#2}% \protected@edef\Short{\@nameauth@Root{#2}}% \ifx\RawSurnames\Short% \let\Surnames\Short% \protected@edef\Suffix{\@empty}% \else% \protected@edef\Suffix{\ignorespaces\@nameauth@Suffix{#2}}% \protected@edef\Surnames{\Short\Space\Suffix}% \fi% \@nameauth@ShowCommafalse% \ifx\testi\@empty% \ifx\testiii\@empty% \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \IndexName: XRef: #2 exists.}% \else% \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \PackageWarning{nameauth}% {macro \IndexName: XRef: #2 #3 exists.}% \else% \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \IndexName: XRef: #1 #2 exists.}% \else% \ifx\Suffix\@empty \@nameauth@Index{\Short, #1}[\@nameauth@CleanName{#1#2}]% \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% \fi% \fi% } % \end{macrocode} % \end{macro} % \cmd{\IndexName} creates an index entry that is not already a pseudonym. It prints nothing. It does ensure consistent formatting. % % \begin{macro}{\ExcludeName} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} \newcommandx\ExcludeName[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \ifx\testi\@empty% \ifx\testiii\@empty% \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax% \else% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2!PN!}}{}% \fi% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax% \else% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}% \fi% \fi% \fi% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: XRef: #1 #2 exists.}% \else% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \PackageWarning{nameauth}% {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% \fi% \fi% \fi% \fi% } % \end{macrocode} % \end{macro} % This macro prevents a name from being formatted or indexed by using the exclusion mechanism of \cmd{\AKA}. The result is that \cmd{\Name} and friends will print their arguments, emit a warning, and continue. % % \begin{macro}{\ForgetName} % \changes{v0.75}{2012/01/19}{New parameter added} % \begin{macrocode} \newcommandx\ForgetName[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \ifx\testi\@empty% \ifx\testiii\@empty% \csundef{\@nameauth@CleanName{#2!MN!}}% \csundef{\@nameauth@CleanName{#2!NF!}}% \else% \csundef{\@nameauth@CleanName{#2#3!MN!}}% \csundef{\@nameauth@CleanName{#2#3!NF!}}% \fi% \else% \csundef{\@nameauth@CleanName{#1#2!MN!}}% \csundef{\@nameauth@CleanName{#1#2!NF!}}% \fi% } % \end{macrocode} % \end{macro} % \cmd{\ForgetName} undefines control sequences to force the ``first use'' option of \cmd{\Name}. % % \begin{macro}{\SubvertName} % \changes{v0.9}{2012/02/10}{Added macro} % \begin{macrocode} \newcommandx\SubvertName[3][1=\@empty, 3=\@empty]% {% \protected@edef\testi{#1}% \protected@edef\testiii{#3}% \ifx\testi\@empty% \ifx\testiii\@empty% \csgdef{\@nameauth@CleanName{#2!MN!}}{}% \csgdef{\@nameauth@CleanName{#2!NF!}}{}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \fi% \else% \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}% \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% \fi% } % \end{macrocode} % \end{macro} % \cmd{\SubvertName} defines control sequences to suppress the ``first use'' of \cmd{\Name}.\\ % % \noindent The following macros toggle formatting and indexing. % % \begin{macro}{\NamesInactive} % \begin{macrocode} \newcommand{\NamesInactive}{\@nameauth@DoFormatfalse} % \end{macrocode} % \end{macro} % % \begin{macro}{\NamesActive} % \begin{macrocode} \newcommand{\NamesActive}{\@nameauth@DoFormattrue} % \end{macrocode} % \end{macro} % % \begin{macro}{\IndexInactive} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} \newcommand{\IndexInactive}{\@nameauth@DoIndexfalse} % \end{macrocode} % \end{macro} % % \begin{macro}{\IndexActive} % \changes{v0.94}{2012/02/15}{Added macro} % \begin{macrocode} \newcommand{\IndexActive}{\@nameauth@DoIndextrue} % \end{macrocode} % \end{macro} % \clearpage % \Finale \endinput % \iffalse % % \fi