summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nameauth
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/nameauth')
-rw-r--r--Master/texmf-dist/tex/latex/nameauth/nameauth.sty879
1 files changed, 462 insertions, 417 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
index 15efb9f11a6..2774f2109de 100644
--- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
+++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
@@ -22,9 +22,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{nameauth}
- [2012/03/08 v1.1 name authority macros to aid consistent display and indexing of names]
- %
-%% \DescribeMacro{\IndexActive}
+ [2012/03/25 v1.2 name authority macros to aid consistent display and indexing of names]
+
\newif\if@nameauth@DoFormat
\newif\if@nameauth@DoIndex
\newif\if@nameauth@DoComma
@@ -47,477 +46,523 @@
\RequirePackage{xparse}
\newcommand*{\@nameauth@CleanName}[1]%
{%
- \expandafter\zap@space\detokenize{#1} \@empty%
+ \expandafter\zap@space\detokenize{#1} \@empty%
}
\newcommand*{\@nameauth@Root}[1]%
{%
- \@nameauth@TrimRoot#1\relax%
+ \@nameauth@TrimRoot#1\relax%
}
\def\@nameauth@TrimRoot#1,#2\relax{#1}
\newcommand*{\@nameauth@Suffix}[1]%
{%
- \@nameauth@TrimSuffix#1\relax%
+ \@nameauth@TrimSuffix#1\relax%
}
\def\@nameauth@TrimSuffix#1,#2\relax{#2}
\newcommand*{\@nameauth@CheckComma}[1]%
{%
- \@nameauth@CheckSuffix#1,\relax%
+ \@nameauth@CheckSuffix#1,\relax%
}
\def\@nameauth@CheckSuffix#1,#2\relax%
{%
- \def\Test{#2}%
- \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi%
+ \def\Test{#2}%
+ \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi%
}
\def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot}
\def\@nameauth@EvalDot%
{%
- \let\@period=.\ifx\@token\@period\expandafter\@gobble \fi%
+ \let\@period=.\ifx\@token\@period\expandafter\@gobble \fi%
}
\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%
+ \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%
}
\DeclareDocumentCommand\@nameauth@FmtName{s m}%
{%
- \@nameauth@DoCapsfalse%
- \@nameauth@TestDot{#2}%
- \IfBooleanTF{#1}%
- {#2}%
- {\bgroup\NamesFormat{#2}\egroup}%
+ \@nameauth@DoCapsfalse%
+ \@nameauth@TestDot{#2}%
+ \IfBooleanTF{#1}%
+ {#2}%
+ {\bgroup\NamesFormat{#2}\egroup}%
}
-\newcommand{\@nameauth@Index}[1]{%
- \if@nameauth@DoIndex\index{#1}\fi%
+\DeclareDocumentCommand\@nameauth@Index{m o}%
+{%
+ \IfValueTF{#2}
+ {\ifcsname#2\endcsname%
+ \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi%
+ \else%
+ \if@nameauth@DoIndex\index{#1}\fi%
+ \fi}%
+ {\if@nameauth@DoIndex\index{#1}\fi}%
}
\newcommand*{\@nameauth@CapRoot}[1]%
{%
- \@nameauth@CR#1\relax%
+ \@nameauth@CR#1\relax%
}
\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
\newcommand{\CapThis}%
{%
- \@nameauth@DoCapstrue%
+ \@nameauth@DoCapstrue%
}
\DeclareDocumentCommand\Name{s o m o}%
{%
- \protected@edef\Surnames{#3}%
- \if@nameauth@DoCaps%
- \protected@edef\Shortnames{\@nameauth@CapRoot{#3,}}%
- \else%
- \protected@edef\Shortnames{\@nameauth@Root{#3,}}%
- \fi%
- \if@nameauth@DoComma\else%
- \@nameauth@CheckComma{#3}%
- \if@nameauth@Comma%
- \protected@edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
- \fi%
- \fi%
- \IfValueTF{#2}%
- {\IfValueTF{#4}%
- {\def\Forenames{#4}}{\def\Forenames{#2}}%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \PackageWarning{nameauth}%
- {macro Name Cross-reference: #2 #3 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #2}}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
- \@nameauth@Index{\Surnames, #2}}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #2}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #2}}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
- \@nameauth@Index{\Surnames, #2}}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #2}%
- \fi%
- \fi%
- \fi}%
- {\IfValueTF{#4}
- {\ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#4}%
- \PackageWarning{nameauth}%
- {macro Name Cross-reference: #3 #4 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#4}%
- \@nameauth@Index{\Surnames\space#4}}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
- \@nameauth@Index{\Surnames\space#4}}%
- \else%
- \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}%
- \expandafter\@nameauth@FmtName\expandafter{%
- \Surnames\space#4}%
- \@nameauth@Index{\Surnames\space#4}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#4}%
- \@nameauth@Index{\Surnames\space#4}}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
- \@nameauth@Index{\Surnames\space#4}}%
- \else%
- \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#4}%
- \@nameauth@Index{\Surnames\space#4}%
- \fi%
- \fi%
- \fi}%
- {\ifcsname\@nameauth@CleanName{#3!PN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \PackageWarning{nameauth}%
- {macro Name Cross-reference: #3 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}}%
- {\@nameauth@FmtName*{\Shortnames}%
- \@nameauth@Index{\Surnames}}%
- \else%
- \csgdef{\@nameauth@CleanName{#3!MN!}}{}%
- \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname%
- \IfBooleanTF{#1}%
- {\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}}%
- {\@nameauth@FmtName*{\Shortnames}%
- \@nameauth@Index{\Surnames}}%
- \else%
- \csgdef{\@nameauth@CleanName{#3!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}%
- \fi%
- \fi%
- \fi}%
- }%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+ \protected@edef\Surnames{#3}%
+ \if@nameauth@DoCaps%
+ \protected@edef\Shortnames{\@nameauth@CapRoot{#3,}}%
+ \else%
+ \protected@edef\Shortnames{\@nameauth@Root{#3,}}%
+ \fi%
+ \if@nameauth@DoComma\else%
+ \@nameauth@CheckComma{#3}%
+ \if@nameauth@Comma%
+ \protected@edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
+ \fi%
+ \fi%
+ \IfValueTF{#2}%
+ {\IfValueTF{#4}%
+ {\def\Forenames{#4}}{\def\Forenames{#2}}%
+ \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \PackageWarning{nameauth}%
+ {macro Name Cross-reference: #2 #3 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]%
+ \fi%
+ \fi%
+ \fi}%
+ {\IfValueTF{#4}
+ {\ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#4}%
+ \PackageWarning{nameauth}%
+ {macro Name Cross-reference: #3 #4 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#4}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter{%
+ \Surnames\space#4}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#4}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#4}%
+ \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]%
+ \fi%
+ \fi%
+ \fi}%
+ {\ifcsname\@nameauth@CleanName{#3!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames}%
+ \PackageWarning{nameauth}%
+ {macro Name Cross-reference: #3 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]}%
+ {\@nameauth@FmtName*{\Shortnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#3!MN!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname%
+ \IfBooleanTF{#1}%
+ {\expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]}%
+ {\@nameauth@FmtName*{\Shortnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#3!NF!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#3}]%
+ \fi%
+ \fi%
+ \fi}%
+ }%
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
\DeclareDocumentCommand\FName{o m o}%
{%
- \protected@edef\Surnames{#2}%
- \if@nameauth@DoComma\else%
- \@nameauth@CheckComma{#2}%
- \if@nameauth@Comma%
- \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
- \fi%
- \fi%
- \IfValueTF{#1}%
- {\IfValueTF{#3}{\edef\Forenames{#3}}{\edef\Forenames{#1}}%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \protected@edef\Surnames{#2}%
+ \if@nameauth@DoComma\else%
+ \@nameauth@CheckComma{#2}%
+ \if@nameauth@Comma%
+ \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
+ \fi%
+ \fi%
+ \IfValueTF{#1}%
+ {\IfValueTF{#3}{\edef\Forenames{#3}}{\edef\Forenames{#1}}%
+ \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Forenames}%
+ \PackageWarning{nameauth}%
+ {macro FName Cross-reference: #1 #2 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Forenames}%
+ \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Forenames}%
+ \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Forenames\expandafter\space\Surnames}%
+ \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]%
+ \fi%
+ \fi%
+ \fi}%
+ {\IfValueTF{#3}
+ {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#3}%
+ \PackageWarning{nameauth}%
+ {macro FName Cross-reference: #2 #3 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
+ \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
+ \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
+ \expandafter\@nameauth@FmtName%
+ \expandafter{\Surnames\space#3}%
+ \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
+ \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
+ \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames\space#3}%
+ \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]%
+ \fi%
+ \fi%
+ \fi}%
+ {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnames}%
+ \PackageWarning{nameauth}%
+ {macro FName Cross-reference: #2 cannot be a page reference.}%
+ \else%
+ \if@nameauth@DoFormat%
+ \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
+ \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
+ \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]%
+ \fi%
+ \else%
+ \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
+ \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Forenames}%
- \PackageWarning{nameauth}%
- {macro FName Cross-reference: #1 #2 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Forenames}%
- \@nameauth@Index{\Surnames, #1}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #1}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Forenames}%
- \@nameauth@Index{\Surnames, #1}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Forenames\expandafter\space\Surnames}%
- \@nameauth@Index{\Surnames, #1}%
- \fi%
- \fi%
- \fi}%
- {\IfValueTF{#3}
- {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#3}%
- \PackageWarning{nameauth}%
- {macro FName Cross-reference: #2 #3 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
- \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
- \@nameauth@Index{\Surnames\space#3}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \expandafter\@nameauth@FmtName%
- \expandafter{\Surnames\space#3}%
- \@nameauth@Index{\Surnames\space#3}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
- \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
- \@nameauth@Index{\Surnames\space#3}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames\space#3}%
- \@nameauth@Index{\Surnames\space#3}%
- \fi%
- \fi%
- \fi}%
- {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \PackageWarning{nameauth}%
- {macro FName Cross-reference: #2 cannot be a page reference.}%
- \else%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
- \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
- \@nameauth@Index{\Surnames}%
- \else%
- \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
- \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
- \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
- \@nameauth@Index{\Surnames}%
- \else%
- \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
- \expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnames}%
- \@nameauth@Index{\Surnames}%
- \fi%
- \fi%
- \fi}%
- }%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+ \expandafter{\Surnames}%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]%
+ \fi%
+ \fi%
+ \fi}%
+ }%
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
\DeclareDocumentCommand\AKA{s o m o m o}%
{%
- \protected@edef\Surnamesi{#3}%
- \protected@edef\Surnamesii{#5}%
- \if@nameauth@DoComma\else%
- \@nameauth@CheckComma{#3}%
- \if@nameauth@Comma%
- \protected@edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
- \fi%
- \@nameauth@CheckComma{#5}%
- \if@nameauth@Comma%
- \protected@edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}%
- \fi%
- \fi%
- \IfValueTF{#4}%
- {\IfValueTF{#6}%
- {\edef\Forenames{#6}}{\edef\Forenames{#4}}%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnamesii}%
- \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!}}{}%
- \IfValueTF{#2}%
- {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi, #2}}}%
- {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi}}}%
- \fi%
- \fi%
- \fi}%
- {\IfValueTF{#6}%
- {\IfBooleanTF{#1}%
- {\@nameauth@FmtName*{#6}}%
- {\expandafter\@nameauth@FmtName\expandafter*%
- \expandafter{\Surnamesii\space#6}}%
- \ifcsname\@nameauth@CleanName{#5#6!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA XRef: #5 #6 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA Name reference: #5 #6 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA Name reference: #5 #6 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}%
- \IfValueTF{#2}%
- {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi, #2}}}%
- {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi}}}%
- \fi%
- \fi%
- \fi}%
- {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}%
- \ifcsname\@nameauth@CleanName{#5!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA XRef: #5 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA Name reference: #5 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname%
- \PackageWarning{nameauth}%
- {macro AKA Name reference: #5 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#5!PN!}}{}%
- \IfValueTF{#2}%
- {\@nameauth@Index{\Surnamesii|see{\Surnamesi, #2}}}%
- {\@nameauth@Index{\Surnamesii|see{\Surnamesi}}}%
- \fi%
- \fi%
- \fi}%
- }%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+ \protected@edef\Surnamesi{#3}%
+ \protected@edef\Surnamesii{#5}%
+ \if@nameauth@DoComma\else%
+ \@nameauth@CheckComma{#3}%
+ \if@nameauth@Comma%
+ \protected@edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
+ \fi%
+ \@nameauth@CheckComma{#5}%
+ \if@nameauth@Comma%
+ \protected@edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}%
+ \fi%
+ \fi%
+ \IfValueTF{#4}%
+ {\IfValueTF{#6}%
+ {\edef\Forenames{#6}}{\edef\Forenames{#4}}%
+ \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
+ \expandafter\Forenames\expandafter\space\Surnamesii}%
+ \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!}}{}%
+ \IfValueTF{#2}%
+ {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi, #2}}}%
+ {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi}}}%
+ \fi%
+ \fi%
+ \fi}%
+ {\IfValueTF{#6}%
+ {\IfBooleanTF{#1}%
+ {\@nameauth@FmtName*{#6}}%
+ {\expandafter\@nameauth@FmtName\expandafter*%
+ \expandafter{\Surnamesii\space#6}}%
+ \ifcsname\@nameauth@CleanName{#5#6!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA XRef: #5 #6 exists.}%
+ \else%
+ \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA Name reference: #5 #6 already exists; no see ref.}%
+ \else%
+ \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA Name reference: #5 #6 already exists; no see ref.}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}%
+ \IfValueTF{#2}%
+ {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi, #2}}}%
+ {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi}}}%
+ \fi%
+ \fi%
+ \fi}%
+ {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}%
+ \ifcsname\@nameauth@CleanName{#5!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA XRef: #5 exists.}%
+ \else%
+ \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA Name reference: #5 already exists; no see ref.}%
+ \else%
+ \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro AKA Name reference: #5 already exists; no see ref.}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#5!PN!}}{}%
+ \IfValueTF{#2}%
+ {\@nameauth@Index{\Surnamesii|see{\Surnamesi, #2}}}%
+ {\@nameauth@Index{\Surnamesii|see{\Surnamesi}}}%
+ \fi%
+ \fi%
+ \fi}%
+ }%
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
\DeclareDocumentCommand\PName{s o m o m o}%
{%
- \IfBooleanTF{#1}{\Name*[#2]{#3}}{\Name[#2]{#3}}%
- {\space}(\AKA[#2]{#3}[#4]{#5}[#6])%
+ \IfBooleanTF{#1}{\Name*[#2]{#3}}{\Name[#2]{#3}}%
+ {\space}(\AKA[#2]{#3}[#4]{#5}[#6])%
+}
+\DeclareDocumentCommand\TagName{o m o m}%
+{%
+ \IfValueTF{#1}%
+ {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro TagName Cannot tag xref: #1 #2.}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#1#2}}{#4}%
+ \fi}%
+ {\IfValueTF{#3}
+ {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro TagName Cannot tag xref: #2 #3.}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2#3}}{#4}%
+ \fi}%
+ {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro TagName Cannot tag xref: #2.}%
+ \else%
+ \csgdef{\@nameauth@CleanName{#2}}{#4}%
+ \fi}%
+ }%
+}
+\DeclareDocumentCommand\UntagName{o m o}%
+{%
+ \IfValueTF{#1}%
+ {\csundef{\@nameauth@CleanName{#1#2}}}%
+ {\IfValueTF{#3}
+ {\csundef{\@nameauth@CleanName{#2#3}}}%
+ {\csundef{\@nameauth@CleanName{#2}}}%
+ }%
}
\DeclareDocumentCommand\IndexName{o m o}%
{%
- \protected@edef\Surnames{#2}%
- \if@nameauth@DoComma\else%
- \@nameauth@CheckComma{#2}%
- \if@nameauth@Comma%
- \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
- \fi%
- \fi%
- \IfValueTF{#1}%
- {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
- \else%
- \@nameauth@Index{\Surnames, #1}%
- \fi}%
- {\IfValueTF{#3}
- {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
- \else%
- \@nameauth@Index{\Surnames\space#3}%
- \fi}%
- {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
- \else%
- \@nameauth@Index{\Surnames}%
- \fi}%
- }%
+ \protected@edef\Surnames{#2}%
+ \if@nameauth@DoComma\else%
+ \@nameauth@CheckComma{#2}%
+ \if@nameauth@Comma%
+ \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
+ \fi%
+ \fi%
+ \IfValueTF{#1}%
+ {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro IndexName XRef: #1 #2 exists.}%
+ \else%
+ \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]%
+ \fi}%
+ {\IfValueTF{#3}
+ {\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}%
+ {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \PackageWarning{nameauth}%
+ {macro IndexName XRef: #2 exists.}%
+ \else%
+ \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]%
+ \fi}%
+ }%
}
\DeclareDocumentCommand\ExcludeName{o m o}%
{%
- \IfValueTF{#1}%
- {%
- \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}%
- {\IfValueTF{#3}%
- {\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}%
- {\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}%
- }%
+ \IfValueTF{#1}%
+ {%
+ \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}%
+ {\IfValueTF{#3}%
+ {\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}%
+ {\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}%
+ }%
}
\DeclareDocumentCommand\ForgetName{o m o}%
{%
- \IfValueTF{#1}%
- {\csundef{\@nameauth@CleanName{#1#2!MN!}}%
- \csundef{\@nameauth@CleanName{#1#2!NF!}}}%
- {\IfValueTF{#3}%
- {\csundef{\@nameauth@CleanName{#2#3!MN!}}%
- \csundef{\@nameauth@CleanName{#2#3!NF!}}}%
- {\csundef{\@nameauth@CleanName{#2!MN!}}%
- \csundef{\@nameauth@CleanName{#2!NF!}}}%
- }%
+ \IfValueTF{#1}%
+ {\csundef{\@nameauth@CleanName{#1#2!MN!}}%
+ \csundef{\@nameauth@CleanName{#1#2!NF!}}}%
+ {\IfValueTF{#3}%
+ {\csundef{\@nameauth@CleanName{#2#3!MN!}}%
+ \csundef{\@nameauth@CleanName{#2#3!NF!}}}%
+ {\csundef{\@nameauth@CleanName{#2!MN!}}%
+ \csundef{\@nameauth@CleanName{#2!NF!}}}%
+ }%
}
\DeclareDocumentCommand\SubvertName{o m o}%
{%
- \IfValueTF{#1}%
- {\csgdef{\@nameauth@CleanName{#1#2!MN!}}%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}}%
- {\IfValueTF{#3}%
- {\csgdef{\@nameauth@CleanName{#2#3!MN!}}%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}}%
- {\csgdef{\@nameauth@CleanName{#2!MN!}}%
- \csgdef{\@nameauth@CleanName{#2!NF!}}}%
- }%
+ \IfValueTF{#1}%
+ {\csgdef{\@nameauth@CleanName{#1#2!MN!}}%
+ \csgdef{\@nameauth@CleanName{#1#2!NF!}}}%
+ {\IfValueTF{#3}%
+ {\csgdef{\@nameauth@CleanName{#2#3!MN!}}%
+ \csgdef{\@nameauth@CleanName{#2#3!NF!}}}%
+ {\csgdef{\@nameauth@CleanName{#2!MN!}}%
+ \csgdef{\@nameauth@CleanName{#2!NF!}}}%
+ }%
}
\newcommand{\NamesInactive}{\@nameauth@DoFormatfalse}
\newcommand{\NamesActive}{\@nameauth@DoFormattrue}