diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-24 22:27:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-24 22:27:28 +0000 |
commit | 3e37a9553890c5435570fde820cbe73a25914550 (patch) | |
tree | ea2abe96270ca9f3abec75551741181d441e2a4d /Master/texmf-dist/source/latex | |
parent | 5a45ba109e23f342168004bf6cf51a8bc8802ede (diff) |
nameauth (24sep13)
git-svn-id: svn://tug.org/texlive/trunk@31746 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/nameauth/nameauth.dtx | 143 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/nameauth/nameauth.ins | 4 |
2 files changed, 85 insertions, 62 deletions
diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx index 2a5201715e8..36e0b5b5f7e 100644 --- a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx +++ b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at att dot net> +% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net> % --------------------------------------------------------------------------- % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -26,7 +26,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesPackage{nameauth} %<*package> - [2013/04/02 v1.7 name authority macros to aid consistent display and indexing of names] + [2013/09/19 v1.8 name authority macros to aid consistent display and indexing of names] %</package> % %<*driver> @@ -58,7 +58,7 @@ \usepackage{makeidx} \usepackage{multicol} \usepackage[toc]{multitoc} -\usepackage{nameauth}[2013/04/02] +\usepackage{nameauth}[2013/09/19] \usepackage{hypdoc} \usepackage{tikz} \makeindex @@ -137,12 +137,13 @@ % \changes{v1.5}{2013/02/22}{Minor bugfixes; added several features} % \changes{v1.6}{2013/03/10}{Added |nameauth| environment} % \changes{v1.7}{2013/04/02}{Change options processing to prevent errors} +% \changes{v1.8}{2013/09/19}{Document undesirable behavior of protected accenting macros in names} % % \DoNotIndex{\@empty, \@gobble, \@period, \@token, \protected@edef, \zap@space, \bfseries, \bgroup, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \expandafter, \fi, \Forenames, \futurelet, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase, \WithSuffix} % % \GetFileInfo{nameauth.dtx} % \title{The \textsf{nameauth} package} -% \author{Charles P. Schaum \\ \texttt{charles dot schaum at att dot net}} +% \author{Charles P. Schaum \\ \texttt{charles dot schaum at comcast dot net}} % \date{\fileversion~from \filedate} % \maketitle % @@ -205,7 +206,7 @@ % \texttt{noindex} & Prevent indexing before the invocation of the macro \cmd{\IndexActive}. See Section~\ref{sec:SectionIndex}.\\[2ex] % \end{tabular} % -% \noindent The options above broadly affect whether formatting and indexing are ``on'' or ``off.'' They set the initial states of formatting and indexing, which can be toggled on and off respectively with \cmd{\NamesActive} and \cmd{\IndexActive} on the one hand and \cmd{\NamesInactive} and \cmd{\IndexInactive} on the other. +% The options above broadly affect whether formatting and indexing are ``on'' or ``off.'' They set the initial states of formatting and indexing, which can be toggled on and off respectively with \cmd{\NamesActive} and \cmd{\IndexActive} on the one hand and \cmd{\NamesInactive} and \cmd{\IndexInactive} on the other. % % This package makes a distinction between \textit{formatting}, i.e., font weight, style, family, placement, and so on, and \textit{form}, i.e., capitalization and name order. The options on the next page alter the printing and capitalization of names apart from their formatting, but they do not change index entries: % @@ -219,7 +220,7 @@ % \texttt{allrevcomma} & Not the same as the |comma| option or the \cmd{\ShowComma} macro. This causes all names to print in reverse Western order, with a comma between the surname and the other names.\\[2ex] % \end{tabular} % -% \noindent Macros that toggle the states represented by these options include \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} for capitalizing entire surnames, \cmd{\ReverseActive} and \cmd{\ReverseInactive} for reversing name order, and \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} to aid making lists in last-comma-first order. An even finer grain of control exists with the macros \cmd{\CapName}, \cmd{\RevName}, and \cmd{\RevComma}, which activate these features on a per-use basis.\\ +% Macros that toggle the states represented by these options include \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} for capitalizing entire surnames, \cmd{\ReverseActive} and \cmd{\ReverseInactive} for reversing name order, and \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} to aid making lists in last-comma-first order. An even finer grain of control exists with the macros \cmd{\CapName}, \cmd{\RevName}, and \cmd{\RevComma}, which activate these features on a per-use basis.\\ % % \begin{tabular}{p{0.2\textwidth}p{0.6\textwidth}} % & {\large\bfseries Formatting Attributes}\\[1ex] @@ -240,7 +241,7 @@ % \node [matrix,column sep=4cm] (tipsi) at (3,3) % { % \node[text width=2cm,align=left](opt){\footnotesize Add to force full name.}; & -% \node[text width=4cm,align=left](grp){\footnotesize Add before immediately subsequent |[|text in braces|]| if \meta{arg3} not used; else omit.}; \\ +% \node[text width=4cm,align=left](grp){\footnotesize Add before immediately subsequent |[|text in brackets|]| if \meta{arg3} not used; else omit.}; \\ % }; % \node [matrix] (macro) at (2,1) % { @@ -307,7 +308,7 @@ % \indent\textsuperscript{3}When \meta{arg1} is empty, \meta{arg3} is an affix. That form cannot be used with \cmd{\PName} and \cmd{\AKA}, but it does work with |comma| and \cmd{\ShowComma}.\\[1ex] % \indent\textsuperscript{4}When expressing Eastern names via \cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN}, they will appear in the index as the Western form \meta{SNN, FNN} even if \cmd{\RevName} is used to create an Eastern word order in the text.\\[1ex] % \indent\textsuperscript{5}When expressing Eastern names using the form \cmd{\Name}\marg{Eastern SNN, FNN} or \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN}, such names will appear in the index using the Eastern form \meta{SNN FNN} even if \cmd{\RevName} is used to create a Western word order in the text.\\[1.5ex] -% If given the choice, use the |nocomma| option and the \meta{Name$_1$, Name$_2$} forms for suffixes and affixes in order to take advantage of extra space removal and other features that minimize possible errors. +% \indent If given the choice, use the |nocomma| option and the \meta{Name$_1$, Name$_2$} forms for suffixes and affixes in order to take advantage of extra space removal and other features that minimize possible errors. % \clearpage % % \DescribeMacro{nameauth} A simplified interface has been introduced as of version 1.6. The |nameauth| environment (best used in the document preamble) sets up a list of shorthands used in place of \cmd{\Name}, \cmd{\Name*}, and \cmd{\FName}. The syntax is: @@ -318,8 +319,9 @@ % | \<| \meta{cseq-abbreviation2} |&| \meta{arg1} |&| \meta{arg2} |&| \meta{arg3} |>| \dots\\ % |\end{nameauth}| % \end{quote} -% Each instance of \meta{cseq-abbreviation} creates three macros. The control sequence itself is an abbreviation for \cmd{\Name}. The form with an L prefixed stands in for \cmd{\Name*}. The form with an S prefixed stands in for \cmd{\FName}. The next example shows most of the name forms from the previous page: +% Each instance of \meta{cseq-abbreviation} creates three macros. The control sequence itself is an abbreviation for \cmd{\Name}. The form with an L prefixed stands in for \cmd{\Name*}. The form with an S prefixed stands in for \cmd{\FName}. There must be four arguments per line. Placement of ampersands is key to avoiding error. Leading and trailing spaces are stripped. % +% The next example shows most of the name forms from the previous page: % \begin{quote} %|\begin{nameauth}|\\ %| \< Wash & George & Washington & >|\\ @@ -334,7 +336,8 @@ %| \< Yosh & & Yoshida & Shigeru >|\\ %|\end{nameauth}| % \end{quote} -% There must be four arguments. Placement of ampersands is key to avoiding error. Leading and trailing spaces are stripped. Using various macros explained later, one can do the following: +% +% This example allows one to do the following: % % \begin{multicols}{2} % \noindent|\Wash|: \Wash \\ @@ -363,7 +366,7 @@ % |\Yosh|: \Yosh % \end{multicols} % -% \noindent As with |\TagName|, one must add extra comment delimiters if the environment is used in the text body. This environment can augment the other macros. +% As with |\TagName|, one must add extra comment delimiters if the environment is used in the text body. This environment can augment the other macros. % \subsubsection{Additional Hints} % \IndexInactive\NamesInactive % \begin{tabular}{lp{4in}} @@ -378,7 +381,7 @@ % Q:&|\Name[Henry]{VIII}| prints either ``\Name*[Henry]{VIII}'' or ``\Name[Henry]{VIII}.'' Adding [Tudor] creates ``\Name*[Henry]{VIII}[Tudor]'' and ``\Name[Henry]{VIII}[Tudor].''\\[0.5ex] % A:&\cmd{\Name}\oarg{King}\marg{Affix} will not work. Even though Mulvany, \emph{Indexing Books}, talks about forenames and optional surnames for royals, we prevent ambiguity by encoding royal names as surnames with optional affixes. Use \cmd{\Name}\marg{King, Affix} if possible, or \cmd{\Name}\marg{King}\oarg{Affix} with the |comma| option. For example, |\Name{Henry, VIII}| gives ``\Name{Henry, VIII}'' and ``\Name{Henry, VIII}.'' Manually add ``Tudor'' in the text and use |\TagName{Henry, VIII}{, Tudor}| to add the tag automatically to the index entry.\ForgetName[Henry]{VIII}\ForgetName{Henry, VIII}\\[1ex] % Q:&|\Name{Aethelred, the really}[Unraedig]| shows ``\Name{Aethelred, the really}[Unraedig]'' or ``\Name{Aethelred, the really}[Unraedig].''\\[0.5ex] -% A:&The form \cmd{\Name}\marg{Mononym, Affix$_1$}\oarg{Affix$_2$} creates two sobriquets, but badly. Use either \cmd{\Name}\marg{Mononym, Affix} or \cmd{\Name}\marg{Mononym}\oarg{Affix} with |comma|. Mix the forms either at your peril or at your whimsy.\\[1ex] +% A:&The form \cmd{\Name}\marg{Mononym, Affix\/$_1$}\oarg{Affix\/$_2$} creates two sobriquets, but badly. Use either \cmd{\Name}\marg{Mononym, Affix} or \cmd{\Name}\marg{Mononym}\oarg{Affix} with |comma|. Mix the forms either at your peril or at your whimsy.\\[1ex] % Q:&|\AKA{Boris}[the Animal]{Just Boris}| fails.\\[0.5ex] % A:&\cmd{\AKA} fails with the \marg{Mononym}\oarg{Affix} pattern in order to avoid the collision of optional arguments. See Section~\ref{sec:AKA}.\\[1ex] % Q:&So how do I deal with some stage names and the like?\\[0.5ex] @@ -429,7 +432,7 @@ % \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: +% 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 @@ -448,7 +451,7 @@ % \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. +% \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. % @@ -480,7 +483,7 @@ % \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: +% 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} % @@ -499,7 +502,9 @@ % {\large\strut}|\Name*[Martin Luther]{King, Jr.}| & \Name*[Martin Luther]{King, Jr.} % \end{tabular} % \end{quote} -% \IndexInactive See Section~\ref{sec:suffix} for more on comma-delimited suffixes. Full-stop detection also works with \cmd{\FName} in cases like the fictional \FName[J.R.]{Wing, III} where one might discuss |``who shot \FName[J.R.]{Wing, III}.''| ``who shot \FName[J.R.]{Wing, III}.''\IndexActive +% \IndexInactive +% +% See Section~\ref{sec:suffix} for more on comma-delimited suffixes. Full-stop detection also works with \cmd{\FName} in cases like the fictional \FName[J.R.]{Wing, III} where one might discuss |``who shot \FName[J.R.]{Wing, III}.''| ``who shot \FName[J.R.]{Wing, III}.''\IndexActive % % \subsection{Affixes and Eastern Names} % @@ -571,7 +576,7 @@ % \DescribeMacro{\AllCapsActive} % \DescribeMacro{\AllCapsInctive} % \DescribeMacro{\CapName} -% \vskip-2.8ex\noindent Full capitalization of surnames occurs with \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName}. These macros are analogous to the reversing macros above and may be used alone or with those macros, e.g. \cmd{\CapName}\cmd{\RevName}\cmd{\Name}: +% \vskip-2.8ex Full capitalization of surnames occurs with \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName}. These macros are analogous to the reversing macros above and may be used alone or with those macros, e.g. \cmd{\CapName}\cmd{\RevName}\cmd{\Name}: % % \NamesInactive\IndexInactive % \begin{quote} @@ -584,7 +589,7 @@ % \end{quote} % \NamesActive\IndexActive % -% \noindent The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. Whoever wants all-cap forms in the index will have to cap everything manually or modify the macros. +% The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. Whoever wants all-cap forms in the index will have to cap everything manually or modify the macros. % % \subsection{Other Naming Topics} % @@ -606,7 +611,8 @@ % \end{tabular} % \end{quote} % \NamesActive -% \noindent There is no way around this ``fail'' here because that is exactly what we want to happen in the case of Eastern names. It is not possible for this package to be all things to all names, but it tries to be as broad as possible. +% +% There is no way around this ``fail'' here because that is exactly what we want to happen in the case of Eastern names. It is not possible for this package to be all things to all names, but it tries to be as broad as possible. % % \subsubsection{Naming Standards} % @@ -624,7 +630,7 @@ % \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}: +% If you use accented names, \textsf{xindy} (or \textsf{texindy}) and \textsf{xelatex} or \textsf{lualatex} are strongly recommended. Nevertheless, if using NFSS, the following Unicode characters are available using \textsf{inputenc}/\textsf{fontenc}: % \begin{quote} % \begin{tabular}{llll} % \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape first use \\ @@ -643,20 +649,28 @@ % Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž & second use \\ % \end{tabular} % \end{quote} -% 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}: +% +% One may use expandable control sequences in names (thanks \Name*[Robert]{Schlicht}). Protected or unexpandable control sequences via |\protected@edef| or |\noexpand| may generate, respectively, empty index entries or unbalanced groups/erroneous entries in the auxiliary files. Thanks to \Name[Patrick]{Cousot} for pointing this out. +% +% To accomplish proper sorting with accents and |makeindex -g|, consider creating your own |.ist| file (pages 659--65 in \emph{The Latex Companion}) or: % \begin{quote}\small -% |\usepackage{newunicodechar}|\\ +% |\IndexInactive\Name{|\meta{actual}|}\index{|\meta{sortkey}|@|\meta{actual}|}\IndexActive| +% \end{quote} +% +% Additional accents and glyphs can be used with Unicode input, NFSS, \textsf{inputenc}, and \textsf{fontenc} when using fonts with TS1 glyphs, e.g., |\usepackage{lmodern}| (per the table on pages 455--63 in \emph{The Latex Companion}): +% \begin{quote} % |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\ % |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\ -% |\newunicodechar{ſ}{\textlongs}|\\ -% |\newunicodechar{ā}{\=a}|\\ -% |\newunicodechar{ṃ}{\d m}| +% |\newunicodechar{s}{\textlongs}| % \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 only works with \textsf{xetex} and \textsf{luatex}, both of which use \textsf{fontspec}. Using \textsf{makeindex} may require The |-g| option and user-created settings in an |.ist| file may be needed. That goes beyond the scope of this document. One could use \cmd{\IndexActive} and \cmd{\IndexInactive} to suppress indexing and create manual entries but that would be tedious in non-English documents. Control sequences like |\=a| fail 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''. Even the manual entry fails in that case. +% Similarly, the following allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz{\=a}li}\IndexActive.: +% \begin{quote} +% |\usepackage{newunicodechar}|\\ +% |\newunicodechar{ā}{\=a}| +% \end{quote} +% Indexing with control sequences like |\=a| will fail, whether with \textsf{nameauth} or manually, when using \textsf{makeindex} and \texttt{gind.ist}. The equal sign becomes an ``actual'' character instead of the |@| (thanks \Name[Dan]{Luecking}). % -% 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.\\ +% This package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:\\ % % \begin{tabular}{ll} % |\usepackage{ifxetex}|\\ @@ -677,7 +691,7 @@ % |\fi| % \end{tabular} % -% \medskip\noindent The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:\\ +% \medskip The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:\\ % % \begin{tabular}{l} % |\ifxetex |\meta{xelatex text}|%|\\ @@ -707,17 +721,15 @@ % |\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: +% \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: +% \let\oldformat\NamesFormat % -% \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 @@ -725,7 +737,7 @@ % \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: +% 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% @@ -737,7 +749,7 @@ % {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 comma-delimited suffix and third-parameter affix forms might cause errors. +% The redefinition of \cmd{\NamesFormat} 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 comma-delimited suffix and third-parameter affix forms might cause errors. % % \subsubsection{Disable Formatting} % \label{sec:SectionFormat} @@ -768,7 +780,7 @@ % \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 when on the same page or on one nearby. +% 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 when on the same page or on one nearby. % % \subsubsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}} % \label{sec:Tweaks} @@ -808,7 +820,7 @@ % \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: +% 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}}+ @@ -852,7 +864,7 @@ % \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}: +% \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 @@ -876,7 +888,7 @@ % \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: +% \bigskip\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}}! @@ -890,7 +902,7 @@ % \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: +% 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}{@{}p{0.5\textwidth}@{}p{0.37\textwidth}@{}}\hline @@ -911,17 +923,19 @@ % \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 an affix. 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: +% 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. \cmd{\TagName} and \cmd{\UntagName} handle their name arguments like \cmd{\IndexName}. 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:\\ +% +% 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.\\ @@ -933,16 +947,17 @@ % |\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. +% \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 whatever an author might want. % % \subsubsection{\texttt{\textbackslash UntagName}} % % \DescribeMacro{\UntagName} -% This macro removes a tag created by \cmd{\TagName}. The syntax is: +% \cmd{\TagName} will replace one tag with another tag, but it does not remove a tag from a name. That is the role of \cmd{\UntagName}. The syntax is: % \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:\\ +% +% By using \cmd{\TagName} and \cmd{\UntagName}, 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.\newline\\[0.5ex] @@ -950,7 +965,8 @@ % |\SubvertName[John]{Smith}| |\UntagName[John]{Smith}| |\Name*[John]{Smith}| & This refers to the original \SubvertName[John]{Smith}\UntagName[John]{Smith}\Name*[John]{Smith}. It is tweaked in order to force a subsequent reference.\\[1ex] % \end{tabular}\\ % \UntagName[John]{Smith} -% \noindent Tagging and untagging in this manner requires the author to juggle more info. With more freedom comes more responsibility. Also, if you use \cmd{\UntagName} within a scope, you may need to repeat it after leaving that scope. +% +% Tagging and untagging in this manner requires the author to juggle more info. With more freedom comes more responsibility. Also, if you use \cmd{\UntagName} within a scope, you may need to repeat it after leaving that scope. % % \subsubsection{\texttt{\textbackslash ExcludeName}} % @@ -959,6 +975,7 @@ % \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} @@ -970,14 +987,20 @@ % % \subsection{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: +% Handling variant name spellings can be complicated. For example, one might settle on the form \Name[W.E.B.]{Du Bois} in one's name authority. Yet an essay might use an alternate spelling for \Name[W.E.B.]{Du Bois}, namely, \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive, where the publisher would not grant the right to alter the spelling. In that case, do the following in that document section: % % \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. +% \item Use |\ForgetName| for the first use when spaces are the only variation. +% \item Wrap \cmd{\Name} and friends between \cmd{\IndexInactive} and \cmd{\IndexActive}. +% \item Call \cmd{\IndexName} with the authoritative form right after \cmd{\IndexActive}. % \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. +% This can look like: +% \begin{quote}% +% \gdef\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}\IndexActive\IndexName[W.E.B.]{Du Bois}}% +% |\def\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}%|\\\hbox to 3pc{\hfil}|\IndexActive\IndexName[W.E.B.]{Du Bois}}| +% \end{quote} +% +% The alternate section mentions |\ForgetName[W.E.B.]{DuBois}\DuBoisAlt| \ForgetName[W.E.B.]{DuBois}\DuBoisAlt, then just |\DuBoisAlt| \DuBoisAlt. The index will only hold the standard form of \Name[W.E.B.]{Du Bois}. This approach 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} @@ -998,14 +1021,14 @@ % Subsequent mononym: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\ % \end{tabular}\\[2ex] % \clearpage -% \noindent Nicknames and alternate forenames use both the first and third arguments of \cmd{\Name}. The index forms are constant even when the print forms change:\\[2ex] +% Nicknames and alternate forenames use both the first and third arguments of \cmd{\Name}. The index forms are constant even when the print forms change:\\[2ex] % \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}} % Long first ref: \ForgetName[J.Q.]{Public}\Name[J.Q.]{Public}[Jane Q.] & |\Name*[J.Q.]{Public}[Jane Q.]|\newline |\Name[J.Q.]{Public}[Jane Q.]|\newline |\FName[J.Q.]{Public}[Jane Q.]|\\[0.5ex] % Different forenames, same surname: \Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\newline\\[0.5ex] % Subsequent name: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\[0.5ex] % Alternate forename: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\[0.5ex] % \end{tabular}\\[2ex] -% These next examples are the ``limited'' variants that work with the \texttt{comma} option. \cmd{\AKA} and \cmd{\PName} cannot cross-reference to these forms. Sections~\ref{sec:suffix} and~\ref{sec:pennames} address this issue with different solutions.\\[2ex] +% \indent These next examples are the ``limited'' variants that work with the \texttt{comma} option. \cmd{\AKA} and \cmd{\PName} cannot cross-reference to these forms. Sections~\ref{sec:suffix} and~\ref{sec:pennames} address this issue with different solutions.\\[2ex] % \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}} % First Eastern reference:\newline \ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\[0.5ex] % Subsequent refs: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\[0.5ex] @@ -1031,7 +1054,7 @@ % Subsequent surname: \Name[George S.]{Patton, Jr.} & |\Name[George S.]{Patton, Jr.}|\\[0.5ex] % Subsequent forename: \FName[George S.]{Patton, Jr.}[George] & |\FName[George S.]{Patton, Jr.}[George]|\\ % \end{tabular}\\[2ex] -% 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] (Section~\ref{sec:Basic}). Using |\Name{Demetrius, I Soter}| keeps the number with the suffix. To keep the number with the name, use |\Name{Demetrius I, Soter}|.\\[2ex] +% \indent 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] (Section~\ref{sec:Basic}). Using |\Name{Demetrius, I Soter}| keeps the number with the suffix. To keep the number with the name, use |\Name{Demetrius I, Soter}|.\\[2ex] % \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}} % First reference: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[0.5ex] % Subsequent full name: \Name*{Francis, I} & |\Name*{Francis, I}|\\[0.5ex] @@ -1060,7 +1083,7 @@ % Subsequent: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\[0.5ex] % Forenames: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\[0.5ex] % \end{tabular}\\[2ex] -% These latter examples of the Continental style use the nickname feature to omit the particles from the index. Long macros are split for readability.\\[2ex] +% \indent These latter examples of the Continental style use the nickname feature to omit the particles from the index. Long macros are split for readability.\\[2ex] % \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}} % First: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\[0.5ex] % Next full name:\newline\hbox to 1em{\hfil}\Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\[0.5ex] @@ -1793,7 +1816,7 @@ \@nameauth@Index{\Surnamesiv|see{\Surnamesii}}% \else% \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesiv|see{\Surnamesii, #1}}% - \else\@nameauth@Index{\Surnamesiv|see{\Shortii, #1, \Suffixii}}\fi% + \else \@nameauth@Index{\Surnamesiv|see{\Shortii, #1, \Suffixii}}\fi% \fi% \fi% \fi% @@ -1827,7 +1850,7 @@ \@nameauth@Index{\Surnamesiv\space#5|see{\Surnamesii}}% \else% \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesiv\space#5|see{\Surnamesii, #1}}% - \else\@nameauth@Index{\Surnamesiv\space#5|see{\Shortii, #1, \Suffixii}}\fi% + \else \@nameauth@Index{\Surnamesiv\space#5|see{\Shortii, #1, \Suffixii}}\fi% \fi% \fi% \fi% @@ -1868,7 +1891,7 @@ \csgdef{\@nameauth@CleanName{#3#4!PN!}}{}% \ifx\testi\@empty% \ifx\Suffixiv\@empty \@nameauth@Index{\Surnamesiv, #3|see{\Surnamesii}}% - \else\@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi% + \else \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi% \else% \ifx\Suffixii\@empty% \ifx\Suffixiv\@empty% diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.ins b/Master/texmf-dist/source/latex/nameauth/nameauth.ins index 56daaacf3c3..94a0506e1c7 100644 --- a/Master/texmf-dist/source/latex/nameauth/nameauth.ins +++ b/Master/texmf-dist/source/latex/nameauth/nameauth.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at att dot net> +%% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net> %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license @@ -21,7 +21,7 @@ This is a generated file. -Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at att dot net> +Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net> This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.2 of this license |