diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-27 22:51:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-27 22:51:54 +0000 |
commit | 68c07ff546c308bdb369d4bffb5c65837041d613 (patch) | |
tree | de7a2d172eb2622d654f37a8f786e6d798902de2 /Master/texmf-dist/tex/latex/nameauth | |
parent | 1f9093ef56c8de2c74750cff37bd292e2cbacff3 (diff) |
nameauth (27jul12)
git-svn-id: svn://tug.org/texlive/trunk@27203 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nameauth')
-rw-r--r-- | Master/texmf-dist/tex/latex/nameauth/nameauth.sty | 898 |
1 files changed, 471 insertions, 427 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty index 8a85de3f081..333ac40c544 100644 --- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty +++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty @@ -22,11 +22,16 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{nameauth} - [2012/04/24 v1.26 name authority macros to aid consistent display and indexing of names] + [2012/07/24 v1.4 name authority macros to aid consistent display and indexing of names] + +\newif\if@nameauth@FullName +\newif\if@nameauth@FirstName +\newif\if@nameauth@AltAKA \newif\if@nameauth@DoFormat \newif\if@nameauth@DoIndex -\newif\if@nameauth@DoComma +\newif\if@nameauth@AlwaysFormat +\newif\if@nameauth@ShowComma \newif\if@nameauth@Comma \newif\if@nameauth@Punct \newif\if@nameauth@DoCaps @@ -36,37 +41,35 @@ \DeclareOption{italic}{\renewcommand{\NamesFormat}{\itshape}} \DeclareOption{boldface}{\renewcommand{\NamesFormat}{\bfseries}} \DeclareOption{noformat}{\renewcommand{\NamesFormat}{}} -\DeclareOption{comma}{\@nameauth@DoCommatrue} -\DeclareOption{nocomma}{\@nameauth@DoCommafalse} +\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{xparse} +\RequirePackage{suffix} +\RequirePackage{xargs} \newcommand*{\@nameauth@CleanName}[1]% {% \expandafter\zap@space\detokenize{#1} \@empty% } \newcommand*{\@nameauth@Root}[1]% {% - \@nameauth@TrimRoot#1\relax% + \@nameauth@TrimRoot#1,\@empty\relax% } \def\@nameauth@TrimRoot#1,#2\relax{#1} +\newcommand*{\@nameauth@CapRoot}[1]% +{% + \@nameauth@CR#1\relax% +} +\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}} \newcommand*{\@nameauth@Suffix}[1]% {% \@nameauth@TrimSuffix#1\relax% } \def\@nameauth@TrimSuffix#1,#2\relax{#2} -\newcommand*{\@nameauth@CheckComma}[1]% -{% - \@nameauth@CheckSuffix#1,\relax% -} -\def\@nameauth@CheckSuffix#1,#2\relax% -{% - \def\Test{#2}% - \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi% -} \def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot} \def\@nameauth@EvalDot% {% @@ -80,537 +83,578 @@ \@nameauth@Punctfalse% \TestDot#1\TestEnd.\TestEnd\TestStop% } -\DeclareDocumentCommand\@nameauth@FmtName{s m}% +\newcommand{\@nameauth@FmtName}[1]% {% - \@nameauth@DoCapsfalse% - \@nameauth@TestDot{#2}% - \IfBooleanTF{#1}% - {#2}% - {\bgroup\NamesFormat{#2}\egroup}% + \@nameauth@TestDot{#1}% + \if@nameauth@DoFormat% + \bgroup\NamesFormat{#1}\egroup% + \else% + #1% + \fi% } -\DeclareDocumentCommand\@nameauth@Index{m o}% +\WithSuffix\newcommand\@nameauth@FmtName*[1]% {% - \IfValueTF{#2} - {\ifcsname#2\endcsname% - \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi% + \@nameauth@TestDot{#1}% + \if@nameauth@DoFormat% + \if@nameauth@AlwaysFormat% + \bgroup\NamesFormat{#1}\egroup% + \else% + #1% + \fi% \else% - \if@nameauth@DoIndex\index{#1}\fi% - \fi}% - {\if@nameauth@DoIndex\index{#1}\fi}% + #1% + \fi% } -\newcommand*{\@nameauth@CapRoot}[1]% +\newcommandx\@nameauth@Index[2][2=\@empty]% {% - \@nameauth@CR#1\relax% + \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% } -\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}} \newcommand{\CapThis}% {% \@nameauth@DoCapstrue% } -\DeclareDocumentCommand\Name{s o m o}% +\newcommand{\ShowComma}% {% - \protected@edef\Surnames{#3}% - \protected@edef\Suffix{\@empty}% - \if@nameauth@DoCaps% - \protected@edef\Shortnames{\@nameauth@CapRoot{#3,}}% + \@nameauth@ShowCommatrue% +} +\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% - \protected@edef\Shortnames{\@nameauth@Root{#3,}}% + \let\Space\Interspace% \fi% - \if@nameauth@DoComma\else% - \@nameauth@CheckComma{#3}% - \if@nameauth@Comma% - \protected@edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% - \protected@edef\Suffix{\@nameauth@Suffix{#3}}% + \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% - \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}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\fi}% - {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\fi}% + \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% - \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% - \expandafter\@nameauth@FmtName\expandafter{% - \expandafter\Forenames\expandafter\space\Surnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\fi% + \@nameauth@Index{\IndexSurnames}[\@nameauth@CleanName{#2}]% \fi% - \else% - \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% - \IfBooleanTF{#1}% - {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% - \expandafter\Forenames\expandafter\space\Surnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\fi}% - {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\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% - \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% - \expandafter\@nameauth@FmtName\expandafter*\expandafter{% - \expandafter\Forenames\expandafter\space\Surnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #2}[\@nameauth@CleanName{#2#3}]% - \else \@nameauth@Index{\Shortnames, #2, \Suffix}[\@nameauth@CleanName{#2#3}]\fi% + \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% - \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% + \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{#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}]}% + \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% - \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}% + \@nameauth@FullNamefalse% + \@nameauth@FirstNamefalse% + \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% - \Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]% + \expandafter\Surnames\expandafter\space#3}% \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}]}% + \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% - \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}% - \expandafter\@nameauth@FmtName\expandafter*% - \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}[\@nameauth@CleanName{#3#4}]% + \@nameauth@FullNamefalse% + \@nameauth@FirstNamefalse% + \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% + \expandafter\@nameauth@FmtName\expandafter*\expandafter{% + \expandafter\Surnames\expandafter\space#3}% \fi% \fi% - \fi}% - {\ifcsname\@nameauth@CleanName{#3!PN!}\endcsname% - \expandafter\@nameauth@FmtName\expandafter*% - \expandafter{\Surnames}% + \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 Cross-reference: #3 cannot be a page reference.}% + {macro \Name: Xref: #1 #2 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% + \ifx\Suffix\@empty% + \@nameauth@Index{\IndexShort, #1}[\@nameauth@CleanName{#1#2}]% \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% + \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}]% \fi% - \fi}% - }% - \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi% -} -\DeclareDocumentCommand\FName{o m o}% -{% - \protected@edef\Surnames{#2}% - \protected@edef\Shortnames{\@nameauth@Root{#2,}}% - \protected@edef\Suffix{\@empty}% - \if@nameauth@DoComma\else% - \@nameauth@CheckComma{#2}% - \if@nameauth@Comma% - \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% - \protected@edef\Suffix{\@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}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]% - \else \@nameauth@Index{\Shortnames, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% + \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}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]% - \else \@nameauth@Index{\Shortnames, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% - \expandafter\@nameauth@FmtName\expandafter*% - \expandafter{\Forenames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]% - \else \@nameauth@Index{\Shortnames, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% - \else% - \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% - \expandafter\@nameauth@FmtName\expandafter*% - \expandafter{\Forenames\expandafter\space\Surnames}% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]% - \else \@nameauth@Index{\Shortnames, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% - \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}]% + \if@nameauth@FirstName% + \@nameauth@FullNamefalse% + \@nameauth@FirstNamefalse% + \let\PrintShort\Forenames% \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}]% + \if@nameauth@FullName% + \@nameauth@FullNamefalse% + \expandafter\@nameauth@FmtName\expandafter*\expandafter{% + \expandafter\Forenames\expandafter\space\Surnames}% \else% - \csgdef{\@nameauth@CleanName{#2!MN!}}{}% - \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]% + \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}% \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{\Surnames}% - \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]% - \fi% + \@nameauth@FullNamefalse% + \@nameauth@FirstNamefalse% + \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% + \expandafter\@nameauth@FmtName\expandafter*\expandafter{% + \expandafter\Forenames\expandafter\space\Surnames}% \fi% - \fi}% - }% + \fi% + \fi% \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi% } -\DeclareDocumentCommand\AKA{s o m o m o}% +\WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]% {% - \protected@edef\Surnamesi{#3}% - \protected@edef\Surnamesii{#5}% - \protected@edef\Shortnamesi{\@nameauth@Root{#3,}}% - \protected@edef\Shortnamesii{\@nameauth@Root{#5,}}% - \protected@edef\Suffixi{\@empty}% - \protected@edef\Suffixii{\@empty}% - \if@nameauth@DoComma\else% - \@nameauth@CheckComma{#3}% - \if@nameauth@Comma% - \protected@edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% - \protected@edef\Suffixi{\@nameauth@Suffix{#3}}% - \fi% - \@nameauth@CheckComma{#5}% - \if@nameauth@Comma% - \protected@edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% - \protected@edef\Suffixii{\@nameauth@Suffix{#5}}% - \fi% + \@nameauth@FullNametrue% + \Name[#1]{#2}[#3]% +} +\newcommandx\FName[3][1=\@empty, 3=\@empty]% +{% + \@nameauth@FirstNametrue% + \Name[#1]{#2}[#3]% +} +\WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]% +{% + \@nameauth@FirstNametrue% + \Name[#1]{#2}[#3]% +} +\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% - \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% + \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 Name reference: #4 #5 already exists; no see ref.}% + {macro \AKA: XRef: #4 exists.}% \else% - \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#4!MN!}\endcsname% \PackageWarning{nameauth}% - {macro AKA Name reference: #4 #5 already exists; no see ref.}% + {macro \AKA: Name reference: #4 already exists; no see ref.}% \else% - \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}% - \IfValueTF{#2}% - {% - \ifx\Suffixi\@empty% - \ifx\Suffixii\@empty% - \@nameauth@Index{\Surnamesii, #4|see{\Surnamesi, #2}}% - \else% - \@nameauth@Index{\Shortnamesii, #4, \Suffixii|see{\Surnamesi, #2}}% - \fi% - \else% - \ifx\Suffixii\@empty% - \@nameauth@Index{\Surnamesii, #4|see{\Shortnamesi, #2, \Suffixi}}% - \else% - \@nameauth@Index{\Shortnamesii, #4, \Suffixii|see{\Shortnamesi, #2, \Suffixi}}% - \fi% - \fi% - }% - {% - \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesii, #4|see{\Surnamesi}}% - \else\@nameauth@Index{\Shortnamesii, #4, \Suffixii|see{\Surnamesi}}\fi% - }% + \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% - \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.}% + \@nameauth@AltAKAfalse% + \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}% \else% - \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname% + \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname% \PackageWarning{nameauth}% - {macro AKA Name reference: #5 #6 already exists; no see ref.}% + {macro \AKA: XRef: #4 #5 exists.}% \else% - \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname% \PackageWarning{nameauth}% - {macro AKA Name reference: #5 #6 already exists; no see ref.}% + {macro \AKA: Name reference: #4 #5 already exists; no see ref.}% \else% - \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}% - \IfValueTF{#2}% - {% - \ifx\Suffixi\@empty \@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi, #2}}% - \else\@nameauth@Index{\Surnamesii\space#6|see{\Shortnamesi, #2, \Suffixi}}\fi% - }% - {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi}}}% + \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% - \fi}% - {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}% - \ifcsname\@nameauth@CleanName{#5!PN!}\endcsname% + \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: #5 exists.}% + {macro \AKA: XRef: #3 #4 exists.}% \else% - \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname% + \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname% \PackageWarning{nameauth}% - {macro AKA Name reference: #5 already exists; no see ref.}% + {macro \AKA: Name reference: #3 #4 already exists; no see ref.}% \else% - \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname% \PackageWarning{nameauth}% - {macro AKA Name reference: #5 already exists; no see ref.}% + {macro \AKA: Name reference: #3 #4 already exists; no see ref.}% \else% - \csgdef{\@nameauth@CleanName{#5!PN!}}{}% - \IfValueTF{#2}% - {% - \ifx\Suffixi\@empty \@nameauth@Index{\Surnamesii|see{\Surnamesi, #2}}% - \else\@nameauth@Index{\Surnamesii|see{\Shortnamesi, #2, \Suffixi}}\fi% - }% - {\@nameauth@Index{\Surnamesii|see{\Surnamesi}}}% + \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}% - }% + \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% } -\DeclareDocumentCommand\PName{s o m o m o}% +\WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]% {% - \IfBooleanTF{#1}{\Name*[#2]{#3}}{\Name[#2]{#3}}% - {\space}(\AKA[#2]{#3}[#4]{#5}[#6])% + \@nameauth@AltAKAtrue% + \AKA[#1]{#2}[#3]{#4}[#5]% } -\DeclareDocumentCommand\TagName{o m o m}% +\newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]% {% - \IfValueTF{#1}% - {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% - \PackageWarning{nameauth}% - {macro TagName Cannot tag xref: #1 #2.}% + \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])% +} +\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% - \csgdef{\@nameauth@CleanName{#1#2}}{#4}% - \fi}% - {\IfValueTF{#3} - {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% + \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \PackageWarning{nameauth}% - {macro TagName Cannot tag xref: #2 #3.}% + {macro \textbackslash TagName Cannot tag xref: #2 #3.}% \else% \csgdef{\@nameauth@CleanName{#2#3}}{#4}% - \fi}% - {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname% + \fi% + \fi% + \else% + \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% - {macro TagName Cannot tag xref: #2.}% + {macro \textbackslash TagName Cannot tag xref: #1 #2.}% \else% - \csgdef{\@nameauth@CleanName{#2}}{#4}% - \fi}% - }% + \csgdef{\@nameauth@CleanName{#1#2}}{#4}% + \fi% + \fi% } -\DeclareDocumentCommand\UntagName{o m o}% +\newcommandx\UntagName[3][1=\@empty, 3=\@empty]% {% - \IfValueTF{#1}% - {\csundef{\@nameauth@CleanName{#1#2}}}% - {\IfValueTF{#3} - {\csundef{\@nameauth@CleanName{#2#3}}}% - {\csundef{\@nameauth@CleanName{#2}}}% - }% + \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% } -\DeclareDocumentCommand\IndexName{o m o}% +\newcommandx\IndexName[3][1=\@empty, 3=\@empty]% {% - \protected@edef\Surnames{#2}% - \protected@edef\Short{\@nameauth@Root{#2,}}% - \protected@edef\Suffix{\@empty}% - \if@nameauth@DoComma\else% - \@nameauth@CheckComma{#2}% - \if@nameauth@Comma% - \protected@edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% - \protected@edef\Suffix{\@nameauth@Suffix{#2}}% - \fi% + \protected@edef\testi{#1}% + \protected@edef\testiii{#3}% + \if@nameauth@ShowComma% + \protected@edef\Space{,\space}% + \else% + \let\Space\Interspace% \fi% - \IfValueTF{#1}% - {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% - \PackageWarning{nameauth}% - {macro IndexName XRef: #1 #2 exists.}% + \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% - \ifx\Suffix\@empty \@nameauth@Index{\Surnames, #1}[\@nameauth@CleanName{#1#2}]% - \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% - \fi}% - {\IfValueTF{#3} - {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% + \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname% \PackageWarning{nameauth}% - {macro IndexName XRef: #2 #3 exists.}% + {macro \IndexName: XRef: #2 #3 exists.}% \else% \@nameauth@Index{\Surnames\space#3}[\@nameauth@CleanName{#2#3}]% - \fi}% - {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname% + \fi% + \fi% + \else% + \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% - {macro IndexName XRef: #2 exists.}% + {macro \IndexName: XRef: #1 #2 exists.}% \else% - \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}]% - \fi}% - }% + \ifx\Suffix\@empty \@nameauth@Index{\Short, #1}[\@nameauth@CleanName{#1#2}]% + \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi% + \fi% + \fi% } -\DeclareDocumentCommand\ExcludeName{o m o}% +\newcommandx\ExcludeName[3][1=\@empty, 3=\@empty]% {% - \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.}% + \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{#1#2!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \PackageWarning{nameauth}% - {macro ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {macro \ExcludeName: Reference: #2 already exists; no exclusion.}% \else% - \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% + \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% - \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.}% + \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax% \else% - \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \PackageWarning{nameauth}% - {macro ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}% \else% - \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}% + \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}% - {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax% + \fi% + \else% + \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% + \PackageWarning{nameauth}% + {macro \ExcludeName: XRef: #1 #2 exists.}% \else% - \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% + \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \PackageWarning{nameauth}% - {macro ExcludeName Reference: #2 already exists; no exclusion.}% + {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}% \else% - \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% + \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \PackageWarning{nameauth}% - {macro ExcludeName Reference: #2 already exists; no exclusion.}% + {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}% \else% - \csgdef{\@nameauth@CleanName{#2!PN!}}{}% + \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% \fi% \fi% - \fi}% - }% + \fi% + \fi% } -\DeclareDocumentCommand\ForgetName{o m o}% +\newcommandx\ForgetName[3][1=\@empty, 3=\@empty]% {% - \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!}}}% - }% + \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% } -\DeclareDocumentCommand\SubvertName{o m o}% +\newcommandx\SubvertName[3][1=\@empty, 3=\@empty]% {% - \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!}}}% - }% + \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% } \newcommand{\NamesInactive}{\@nameauth@DoFormatfalse} \newcommand{\NamesActive}{\@nameauth@DoFormattrue} |