diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-24 22:13:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-24 22:13:48 +0000 |
commit | f84e441f563ccac19ce53299ad4a6d507e0c0c35 (patch) | |
tree | 76b2ce96e8e11a8146c2f7a85951443dd4d90088 /Master/texmf-dist/tex/latex/nameauth | |
parent | 21dd641b3e636daa59b326c76dabbe7b62e535dd (diff) |
nameauth (24nov20)
git-svn-id: svn://tug.org/texlive/trunk@56995 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 | 2347 |
1 files changed, 1273 insertions, 1074 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty index d780a123dc1..40ed29207da 100644 --- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty +++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty @@ -6,32 +6,46 @@ %% %% nameauth.dtx (with options: `package') %% -%% --------:| ---------------------------------------------------------------- -%% nameauth:| Name authority mechanism for consistency in text and index -%% Author:| Charles P. Schaum -%% E-mail:| charles dot schaum@comcast.net -%% License:| Released under the LaTeX Project Public License 1.3c or later -%% See:| http://www.latex-project.org/lppl.txt +%% This is a generated file. %% -\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%% Copyright (C) 2020 by Charles P. Schaum <charles[dot]schaum@comcast.net> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{nameauth} - [2020/02/26 3.4 Name authority mechanism for consistency in text and index] + [2020/11/23 3.5 Name authority mechanism for consistency in text and index] + +\newif\if@nameauth@Verbose \newif\if@nameauth@InAKA \newif\if@nameauth@InName \newif\if@nameauth@Xref \newif\if@nameauth@Lock \newif\if@nameauth@BigLock \newif\if@nameauth@InHook +\newif\if@nameauth@GlobalScope +\newif\if@nameauth@IdxDebug +\newif\if@nameauth@LongIdxDebug \newif\if@nameauth@DoIndex \newif\if@nameauth@SkipIndex \newif\if@nameauth@JustIndex \newif\if@nameauth@Pretag \newif\if@nameauth@SeeAlso +\newif\if@nameauth@OldSee \newif\if@nameauth@MainFormat \newif\if@nameauth@AKAFormat \newif\if@nameauth@LocalNames \newif\if@nameauth@OldReset \newif\if@nameauth@OldPass +\newif\if@nameauth@OldToks \newif\if@nameauth@Forget \newif\if@nameauth@Subvert \newif\if@nameauth@FirstFormat @@ -59,13 +73,12 @@ \newif\if@nameauth@Accent \newif\if@nameauth@AltFormat \newif\if@nameauth@DoAlt -\newif\if@nameauth@Verbose -\newtoks\@nameauth@toksa% -\newtoks\@nameauth@toksb% -\newtoks\@nameauth@toksc% -\newtoks\@nameauth@etoksb% -\newtoks\@nameauth@etoksc% -\newtoks\@nameauth@etoksd% +\newtoks\@nameauth@toksa +\newtoks\@nameauth@toksb +\newtoks\@nameauth@toksc +\newtoks\@nameauth@etoksb +\newtoks\@nameauth@etoksc +\newtoks\@nameauth@etoksd \newcommand*\NamesFormat{} \newcommand*\MainNameHook{} \newcommand*\FrontNamesFormat{} @@ -73,32 +86,36 @@ \newcommand*\NameauthName{\@nameauth@Name} \newcommand*\NameauthLName{\@nameauth@Name} \newcommand*\NameauthFName{\@nameauth@Name} -\DeclareOption{comma}{\@nameauth@AlwaysCommatrue} -\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse} +\newcommand*\NameauthIndex{\index} \DeclareOption{mainmatter}{\@nameauth@MainFormattrue} \DeclareOption{frontmatter}{\@nameauth@MainFormatfalse} +\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue} \DeclareOption{formatAKA}{\@nameauth@AKAFormattrue} -\DeclareOption{oldAKA}{\@nameauth@OldAKAtrue} -\DeclareOption{oldreset}{\@nameauth@OldResettrue} -\DeclareOption{oldpass}{\@nameauth@OldPasstrue} \DeclareOption{index}{\@nameauth@DoIndextrue} \DeclareOption{noindex}{\@nameauth@DoIndexfalse} \DeclareOption{pretag}{\@nameauth@Pretagtrue} \DeclareOption{nopretag}{\@nameauth@Pretagfalse} -\DeclareOption{allcaps}{\@nameauth@AllCapstrue} +\DeclareOption{verbose}{\@nameauth@Verbosetrue} +\DeclareOption{globaltest}{\@nameauth@GlobalScopetrue} +\DeclareOption{oldAKA}{\@nameauth@OldAKAtrue} +\DeclareOption{oldreset}{\@nameauth@OldResettrue} +\DeclareOption{oldpass}{\@nameauth@OldPasstrue} +\DeclareOption{oldtoks}{\@nameauth@OldTokstrue} +\DeclareOption{oldsee}{\@nameauth@OldSeetrue} +\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse} +\DeclareOption{comma}{\@nameauth@AlwaysCommatrue} \DeclareOption{normalcaps}{\@nameauth@AllCapsfalse} +\DeclareOption{allcaps}{\@nameauth@AllCapstrue} +\DeclareOption{notreversed}% + {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse} \DeclareOption{allreversed}% {\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse} \DeclareOption{allrevcomma}% {\@nameauth@RevAllfalse\@nameauth@RevAllCommatrue} -\DeclareOption{notreversed}% - {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse} -\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue} +\DeclareOption{noformat}{\renewcommand*\NamesFormat{}} \DeclareOption{smallcaps}{\renewcommand*\NamesFormat{\scshape}} \DeclareOption{italic}{\renewcommand*\NamesFormat{\itshape}} \DeclareOption{boldface}{\renewcommand*\NamesFormat{\bfseries}} -\DeclareOption{noformat}{\renewcommand*\NamesFormat{}} -\DeclareOption{verbose}{\@nameauth@Verbosetrue} \DeclareOption{altformat}{% \@nameauth@AltFormattrue\@nameauth@DoAlttrue} \ExecuteOptions% @@ -106,31 +123,44 @@ normalcaps,notreversed,noformat} \ProcessOptions\relax \RequirePackage{etoolbox} -\RequirePackage{suffix} \RequirePackage{trimspaces} +\RequirePackage{suffix} \RequirePackage{xargs} +\def\@nameauth@Actual{@} +\newcommand*\@nameauth@Exclude{!} \newcommand*\@nameauth@Clean[1] {\expandafter\zap@space\detokenize{#1} \@empty} +\newcommand*\@nameauth@MakeCS[1] +{% + \unless\ifcsname#1\endcsname + \unless\if@nameauth@InAKA\csgdef{#1}{}\fi + \fi +} \newcommand*\@nameauth@Root[1]{\@nameauth@@Root#1,\\} \def\@nameauth@@Root#1,#2\\{\trim@spaces{#1}} \newcommand*\@nameauth@TrimTag[1]{\@nameauth@@TrimTag#1|\\} \def\@nameauth@@TrimTag#1|#2\\{#1} \newcommand*\@nameauth@Suffix[1]{\@nameauth@@Suffix#1,,\\} -\def\@nameauth@@Suffix#1,#2,#3\\% - {\ifx\\#2\\\@empty\else\trim@spaces{#2}\fi} +\def\@nameauth@@Suffix#1,#2,#3\\{% + \ifx\\#2\\\@empty\else\trim@spaces{#2}\fi +} \newcommand*\@nameauth@GetSuff[1]{\@nameauth@@GetSuff#1,,\\} \def\@nameauth@@GetSuff#1,#2,#3\\{#2} \newcommand*\@nameauth@TestToks[1] {% \toks@\expandafter{\@car#1\@nil}% - \edef\one{\the\toks@}% + \edef\@nameauth@one{\the\toks@}% \toks@\expandafter{\@carß\@nil}% - \edef\two{\the\toks@}% - \ifx\one\two\@nameauth@UTFtrue\else\@nameauth@UTFfalse\fi + \edef\@nameauth@two{\the\toks@}% + \ifx\@nameauth@one\@nameauth@two + \@nameauth@UTFtrue% + \else + \@nameauth@UTFfalse% + \fi } \newcommand*\@nameauth@UTFtest[1] {% - \def\testarg{#1}% + \def\@nameauth@testarg{#1}% \ifdefined\Umathchar \@nameauth@UTFfalse% \else @@ -138,7 +168,8 @@ \if@nameauth@Accent \@nameauth@UTFtrue\@nameauth@Accentfalse% \else - \expandafter\@nameauth@TestToks\expandafter{\testarg}% + \expandafter\@nameauth@TestToks% + \expandafter{\@nameauth@testarg}% \fi \else \@nameauth@UTFfalse% @@ -147,10 +178,12 @@ } \newcommand*\@nameauth@UTFtestS[1] {% - \let\ex\expandafter% - \ex\def\ex\testarg\ex{\@nameauth@GetSuff{#1}}% - \ex\toks@\ex\ex\ex{\testarg}% - \ex\def\ex\test@rg\ex{\the\toks@}% + \expandafter\def\expandafter\@nameauth@testarg% + \expandafter{\@nameauth@GetSuff{#1}}% + \expandafter\toks@% + \expandafter\expandafter\expandafter{\@nameauth@testarg}% + \expandafter\def\expandafter\@nameauth@test@rg% + \expandafter{\the\toks@}% \ifdefined\Umathchar \@nameauth@UTFfalse% \else @@ -158,7 +191,8 @@ \if@nameauth@Accent \@nameauth@UTFtrue\@nameauth@Accentfalse% \else - \expandafter\@nameauth@TestToks\expandafter{\test@rg}% + \expandafter\@nameauth@TestToks% + \expandafter{\@nameauth@test@rg}% \fi \else \@nameauth@UTFfalse% @@ -166,46 +200,248 @@ \fi } \newcommand*\@nameauth@Cap[1]{\@nameauth@C@p#1\\} -\def\@nameauth@C@p#1#2\\% - {\expandafter\trim@spaces\expandafter{\MakeUppercase{#1}#2}} +\def\@nameauth@C@p#1#2\\{% + \expandafter\trim@spaces\expandafter{\MakeUppercase{#1}#2}% +} \newcommand*\@nameauth@CapUTF[1]{\@nameauth@C@pUTF#1\\} -\def\@nameauth@C@pUTF#1#2#3\\% - {\expandafter\trim@spaces\expandafter{\MakeUppercase{#1#2}#3}} +\def\@nameauth@C@pUTF#1#2#3\\{% + \expandafter\trim@spaces\expandafter{\MakeUppercase{#1#2}#3}% +} +\newcommand*\@nameauth@CapArgs[3] +{% + \ifdefined\@nameauth@InParser + \unless\if@nameauth@AltFormat + \let\carga\arga% + \let\crootb\rootb% + \let\csuffb\suffb% + \let\cargc\argc% + \unless\ifx\arga\@empty + \def\test{#1}% + \expandafter\@nameauth@UTFtest\expandafter{\test}% + \if@nameauth@UTF + \expandafter\def\expandafter\carga\expandafter{% + \expandafter\@nameauth@CapUTF\expandafter{\test}}% + \else + \expandafter\def\expandafter\carga\expandafter{% + \expandafter\@nameauth@Cap\expandafter{\test}}% + \fi + \fi + \def\test{#2}% + \expandafter\@nameauth@UTFtest\expandafter{\test}% + \if@nameauth@UTF + \expandafter\def\expandafter\crootb\expandafter{% + \expandafter\@nameauth@CapUTF\expandafter{\rootb}}% + \else + \expandafter\def\expandafter\crootb\expandafter{% + \expandafter\@nameauth@Cap\expandafter{\rootb}}% + \fi + \unless\ifx\suffb\@empty + \def\test{#2}% + \expandafter\@nameauth@UTFtestS\expandafter{\test}% + \protected@edef\test{\@nameauth@GetSuff{#2}}% + \if@nameauth@UTF + \protected@edef\test{\@nameauth@Suffix{#2}}% + \expandafter\def\expandafter\csuffb\expandafter{% + \expandafter\@nameauth@CapUTF\expandafter{\test}}% + \else + \edef\@nameauth@test{\@nameauth@Suffix{#2}}% + \expandafter\def\expandafter\csuffb\expandafter{% + \expandafter\@nameauth@Cap\expandafter{\test}}% + \fi + \fi + \unless\ifx\argc\@empty + \def\test{#3}% + \expandafter\@nameauth@UTFtest\expandafter{\test}% + \if@nameauth@UTF + \expandafter\def\expandafter\cargc\expandafter{% + \expandafter\@nameauth@CapUTF\expandafter{\test}}% + \else + \expandafter\def\expandafter\cargc\expandafter{% + \expandafter\@nameauth@Cap\expandafter{\test}}% + \fi + \fi + \let\arga\carga% + \let\rootb\crootb% + \let\suffb\csuffb% + \let\argc\cargc% + \fi + \fi +} \newcommand*\@nameauth@TestDot[1] {% - \def\TestDot##1.\TestEnd##2\\{\TestPunct{##2}}% - \def\TestPunct##1{% - \ifx\TestPunct##1\TestPunct% + \def\@nameauth@TestD@t##1.\@End##2\\{\@nameauth@TestPunct{##2}}% + \def\@nameauth@TestPunct##1% + {% + \ifx\@nameauth@TestPunct##1\@nameauth@TestPunct \else - \@nameauth@Puncttrue% + \global\@nameauth@Puncttrue% \fi }% - \@nameauth@Punctfalse% - \TestDot#1\TestEnd.\TestEnd\\% + \global\@nameauth@Punctfalse% + \@nameauth@TestD@t#1\@End.\@End\\% } -\newcommand*\@nameauth@CheckDot% - {\futurelet\@token\@nameauth@EvalDot} -\newcommand*\@nameauth@EvalDot% +\newcommand*\@nameauth@CheckDot + {\futurelet\@nameauth@token\@nameauth@EvalDot} +\newcommand*\@nameauth@EvalDot {% - \let\@period=.% - \ifx\@token\@period\expandafter\@gobble \fi + \let\@nameauth@stop=.% + \ifx\@nameauth@token\@nameauth@stop\expandafter\@gobble \fi +} +\newcommand*\@nameauth@AddPunct +{% + \ifdefined\@nameauth@InParser + \def\Space{ }% + \def\SpaceX{ }% + \if@nameauth@NBSP \edef\Space{\nobreakspace}\fi + \if@nameauth@NBSPX \edef\SpaceX{\nobreakspace}\fi + \unless\ifx\arga\@empty + \if@nameauth@AlwaysComma + \def\Space{, }% + \if@nameauth@NBSP \edef\Space{,\nobreakspace}\fi + \fi + \if@nameauth@ShowComma + \def\Space{, }% + \if@nameauth@NBSP \edef\Space{,\nobreakspace}\fi + \fi + \if@nameauth@NoComma + \def\Space{ }% + \if@nameauth@NBSP \edef\Space{\nobreakspace}\fi + \fi + \fi + \fi +} +\newcommand*\@nameauth@LoadArgs[3] +{% + \protected@edef\@nameauth@A{\trim@spaces{#1}}% + \protected@edef\@nameauth@B{\@nameauth@Root{#2}}% + \protected@edef\@nameauth@SB{\@nameauth@Suffix{#2}}% + \protected@edef\@nameauth@C{\trim@spaces{#3}}% + \def\@nameauth@csb{\@nameauth@Clean{#2}}% + \def\@nameauth@csbc{\@nameauth@Clean{#2,#3}}% + \def\@nameauth@csab{\@nameauth@Clean{#1!#2}}% +} +\newcommand\@nameauth@Choice[3] +{% + \ifx\@nameauth@A\@empty + \ifx\@nameauth@C\@empty + #1% + \else + \ifx\@nameauth@SB\@empty + #2% + \else + #1% + \fi + \fi + \else + #3% + \fi +} +\newcommand*\@nameauth@Flags +{% + \if@nameauth@OldReset + \if@nameauth@InAKA + \@nameauth@AltAKAfalse% + \fi + \@nameauth@SkipIndexfalse% + \if@nameauth@InName + \@nameauth@Forgetfalse% + \@nameauth@Subvertfalse% + \fi + \@nameauth@NBSPfalse% + \@nameauth@NBSPXfalse% + \@nameauth@DoCapsfalse% + \@nameauth@Accentfalse% + \@nameauth@AllThisfalse% + \@nameauth@ShowCommafalse% + \@nameauth@NoCommafalse% + \@nameauth@RevThisfalse% + \@nameauth@RevThisCommafalse% + \@nameauth@ShortSNNfalse% + \@nameauth@EastFNfalse% + \else + \if@nameauth@InAKA + \global\@nameauth@AltAKAfalse% + \fi + \global\@nameauth@SkipIndexfalse% + \global\@nameauth@Forgetfalse% + \global\@nameauth@Subvertfalse% + \global\@nameauth@NBSPfalse% + \global\@nameauth@NBSPXfalse% + \global\@nameauth@DoCapsfalse% + \global\@nameauth@Accentfalse% + \global\@nameauth@AllThisfalse% + \global\@nameauth@ShowCommafalse% + \global\@nameauth@NoCommafalse% + \global\@nameauth@RevThisfalse% + \global\@nameauth@RevThisCommafalse% + \global\@nameauth@ShortSNNfalse% + \global\@nameauth@EastFNfalse% + \fi } \newcommand*\@nameauth@Error[2] {% - \edef\msga{#2 SNN arg empty}% - \edef\msgb{#2 SNN arg malformed}% - \protected@edef\testname{\trim@spaces{#1}}% - \protected@edef\testroot{\@nameauth@Root{#1}}% - \ifx\testname\@empty - \PackageError{nameauth}{\msga}% + \edef\@nameauth@msga{#2 SNN arg empty}% + \edef\@nameauth@msgb{#2 SNN arg malformed}% + \protected@edef\@nameauth@testname{\trim@spaces{#1}}% + \protected@edef\@nameauth@testroot{\@nameauth@Root{#1}}% + \ifx\@nameauth@testname\@empty + \PackageError{nameauth}{\@nameauth@msga}% \fi - \ifx\testroot\@empty - \PackageError{nameauth}{\msgb}% + \ifx\@nameauth@testroot\@empty + \PackageError{nameauth}{\@nameauth@msgb}% \fi } +\newcommandx*\@nameauth@Debug[3][1=\@empty, 3=\@empty] +{% + \begingroup% + \def\NameauthIndex##1{##1}% + \@nameauth@DoIndextrue% + \@nameauth@LoadArgs{#1}{#2}{#3}% + \@nameauth@Error{#2}{macro \string\@nameauth@Debug}% + \@nameauth@Choice% + {% + \unless\if@nameauth@IdxDebug + \@nameauth@csb% + \else + \csundef{\@nameauth@csb!PN}% + \unless\if@nameauth@LongIdxDebug + \csundef{\@nameauth@csb!PRE}% + \csundef{\@nameauth@csb!TAG}% + \fi + \IndexName[#1]{#2}[#3]% + \fi + }% + {% + \unless\if@nameauth@IdxDebug + \@nameauth@csbc% + \else + \csundef{\@nameauth@csbc!PN}% + \unless\if@nameauth@LongIdxDebug + \csundef{\@nameauth@csbc!PRE}% + \csundef{\@nameauth@csbc!TAG}% + \fi + \IndexName[#1]{#2}[#3]% + \fi + }% + {% + \unless\if@nameauth@IdxDebug + \@nameauth@csab% + \else + \csundef{\@nameauth@csab!PN}% + \unless\if@nameauth@LongIdxDebug + \csundef{\@nameauth@csab!PRE}% + \csundef{\@nameauth@csab!TAG}% + \fi + \IndexName[#1]{#2}[#3]% + \fi + }% + \endgroup% + \global\@nameauth@IdxDebugfalse% + \global\@nameauth@LongIdxDebugfalse% +} \newcommandx*\@nameauth@Name[3][1=\@empty, 3=\@empty] {% - \if@nameauth@BigLock\@nameauth@Locktrue\fi + \if@nameauth@BigLock \@nameauth@Locktrue\fi \unless\if@nameauth@Lock \@nameauth@Locktrue% \@nameauth@InNametrue% @@ -226,202 +462,101 @@ \fi \fi \else - \if@nameauth@Forget - \ForgetName[#1]{#2}[#3]% - \else - \if@nameauth@Subvert - \SubvertName[#1]{#2}[#3]% - \fi - \fi + \if@nameauth@Subvert \SubvertName[#1]{#2}[#3]\fi + \if@nameauth@Forget \ForgetName[#1]{#2}[#3]\fi \leavevmode\hbox{}% - \unless\if@nameauth@SkipIndex\IndexName[#1]{#2}[#3]\fi + \unless\if@nameauth@SkipIndex \IndexName[#1]{#2}[#3]\fi \if@nameauth@MainFormat - \@nameauth@Parse[#1]{#2}[#3]{!MN}% - \else - \@nameauth@Parse[#1]{#2}[#3]{!NF}% - \fi - \unless\if@nameauth@SkipIndex\IndexName[#1]{#2}[#3]\fi - \if@nameauth@OldReset - \@nameauth@SkipIndexfalse% - \@nameauth@Forgetfalse% - \@nameauth@Subvertfalse% - \@nameauth@NBSPfalse% - \@nameauth@NBSPXfalse% - \@nameauth@DoCapsfalse% - \@nameauth@Accentfalse% - \@nameauth@AllThisfalse% - \@nameauth@ShowCommafalse% - \@nameauth@NoCommafalse% - \@nameauth@RevThisfalse% - \@nameauth@RevThisCommafalse% - \@nameauth@ShortSNNfalse% - \@nameauth@EastFNfalse% + \@nameauth@Parse{#1}{#2}{#3}{!MN}% \else - \global\@nameauth@SkipIndexfalse% - \global\@nameauth@Forgetfalse% - \global\@nameauth@Subvertfalse% - \global\@nameauth@NBSPfalse% - \global\@nameauth@NBSPXfalse% - \global\@nameauth@DoCapsfalse% - \global\@nameauth@Accentfalse% - \global\@nameauth@AllThisfalse% - \global\@nameauth@ShowCommafalse% - \global\@nameauth@NoCommafalse% - \global\@nameauth@RevThisfalse% - \global\@nameauth@RevThisCommafalse% - \global\@nameauth@ShortSNNfalse% - \global\@nameauth@EastFNfalse% + \@nameauth@Parse{#1}{#2}{#3}{!NF}% \fi + \unless\if@nameauth@SkipIndex \IndexName[#1]{#2}[#3]\fi + \@nameauth@Flags% \fi \@nameauth@Lockfalse% \@nameauth@InNamefalse% \fi \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi } -\newcommandx*\@nameauth@Parse[4][1=\@empty, 3=\@empty] +\newcommand\@nameauth@Parse[4] {% - \if@nameauth@BigLock\@nameauth@Lockfalse\fi + \if@nameauth@BigLock \@nameauth@Lockfalse\fi \if@nameauth@Lock - \let\ex\expandafter% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\rootb{\@nameauth@Root{#2}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \protected@edef\argc{\trim@spaces{#3}}% - \if@nameauth@AllCaps\@nameauth@AllThistrue\fi - \if@nameauth@RevAll\@nameauth@RevThistrue\fi - \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% - \@nameauth@toksa\expandafter{#1}% - \@nameauth@toksb\expandafter{#2}% - \@nameauth@toksc\expandafter{#3}% - \if@nameauth@DoCaps - \let\carga\arga% - \let\crootb\rootb% - \let\csuffb\suffb% - \let\cargc\argc% - \unless\if@nameauth@AltFormat - \unless\ifx\arga\@empty - \def\test{#1}% - \ex\@nameauth@UTFtest\ex{\test}% - \if@nameauth@UTF - \ex\def\ex\carga\ex{\ex\@nameauth@CapUTF\ex{\test}}% - \else - \ex\def\ex\carga\ex{\ex\@nameauth@Cap\ex{\test}}% - \fi + \if@nameauth@OldToks + \@nameauth@toksa\expandafter{#1}% + \@nameauth@toksb\expandafter{#2}% + \@nameauth@toksc\expandafter{#3}% + \else + \global\@nameauth@toksa\expandafter{#1}% + \global\@nameauth@toksb\expandafter{#2}% + \global\@nameauth@toksc\expandafter{#3}% + \fi + \if@nameauth@AllCaps \@nameauth@AllThistrue\fi + \if@nameauth@RevAll \@nameauth@RevThistrue\fi + \if@nameauth@RevAllComma \@nameauth@RevThisCommatrue\fi + \begingroup% + \def\@nameauth@InParser{}% + \@nameauth@LoadArgs{#1}{#2}{#3}% + \let\arga\@nameauth@A% + \let\rootb\@nameauth@B% + \let\suffb\@nameauth@SB% + \let\argc\@nameauth@C% + \if@nameauth@DoCaps + \@nameauth@CapArgs{#1}{#2}{#3}% + \fi + \if@nameauth@AllThis + \protected@edef\rootb% + {\MakeUppercase{\@nameauth@Root{#2}}}% + \fi + \@nameauth@AddPunct% + \let\SNN\rootb% + \@nameauth@Choice% + {% + \ifx\argc\@empty + \let\FNN\suffb% + \else + \let\FNN\argc% \fi - \def\test{#2}% - \ex\@nameauth@UTFtest\ex{\test}% - \if@nameauth@UTF - \ex\def\ex\crootb\ex{\ex\@nameauth@CapUTF\ex{\rootb}}% + \@nameauth@NonWest{\@nameauth@csb#4}% + \@nameauth@MakeCS{\@nameauth@csb#4}% + }% + {% + \let\FNN\argc% + \@nameauth@NonWest{\@nameauth@csbc#4}% + \@nameauth@MakeCS{\@nameauth@csbc#4}% + }% + {% + \ifx\argc\@empty + \let\FNN\arga% \else - \ex\def\ex\crootb\ex{\ex\@nameauth@Cap\ex{\rootb}}% + \let\FNN\argc% \fi \unless\ifx\suffb\@empty - \def\test{#2}% - \ex\@nameauth@UTFtestS\ex{\test}% - \protected@edef\test{\@nameauth@GetSuff{#2}}% - \if@nameauth@UTF - \protected@edef\test{\@nameauth@Suffix{#2}}% - \ex\def\ex\csuffb\ex{\ex\@nameauth@CapUTF\ex{\test}}% - \else - \edef\test{\@nameauth@Suffix{#2}}% - \ex\def\ex\csuffb\ex{\ex\@nameauth@Cap\ex{\test}}% - \fi - \fi - \unless\ifx\argc\@empty - \def\test{#3}% - \ex\@nameauth@UTFtest\ex{\test}% - \if@nameauth@UTF - \ex\def\ex\cargc\ex{\ex\@nameauth@CapUTF\ex{\test}}% - \else - \ex\def\ex\cargc\ex{\ex\@nameauth@Cap\ex{\test}}% + \def\SNN{\rootb\Space\suffb}% + \if@nameauth@ShortSNN + \let\SNN\rootb% \fi \fi - \fi - \let\arga\carga% - \let\rootb\crootb% - \let\suffb\csuffb% - \let\argc\cargc% - \fi - \if@nameauth@AllThis - \protected@edef\rootb{\MakeUppercase{\@nameauth@Root{#2}}}% - \fi - \edef\Space{\space}% - \edef\SpaceX{\space}% - \if@nameauth@NBSP\edef\Space{\nobreakspace}\fi - \if@nameauth@NBSPX\edef\SpaceX{\nobreakspace}\fi - \unless\ifx\arga\@empty - \if@nameauth@AlwaysComma - \edef\Space{,\space}% - \if@nameauth@NBSP\edef\Space{,\nobreakspace}\fi - \fi - \if@nameauth@ShowComma - \edef\Space{,\space}% - \if@nameauth@NBSP\edef\Space{,\nobreakspace}\fi - \fi - \if@nameauth@NoComma - \edef\Space{\space}% - \if@nameauth@NBSP\edef\Space{\nobreakspace}\fi - \fi - \fi - \let\SNN\rootb% - \ifx\arga\@empty - \ifx\argc\@empty - \let\FNN\suffb% - \let\SNN\rootb% - \@nameauth@NonWest{\csb#4}% - \else - \ifx\suffb\@empty - \let\FNN\argc% - \let\SNN\rootb% - \@nameauth@NonWest{\csbc#4}% - \else - \let\FNN\argc% - \let\SNN\rootb% - \@nameauth@NonWest{\csb#4}% - \fi - \fi + \@nameauth@West{\@nameauth@csab#4}% + \@nameauth@MakeCS{\@nameauth@csab#4}% + }% + \endgroup% + \if@nameauth@OldReset + \@nameauth@FullNamefalse% + \@nameauth@FirstNamefalse% + \@nameauth@FirstFormatfalse% \else - \ifx\argc\@empty - \let\FNN\arga% - \else - \let\FNN\argc% - \fi - \unless\ifx\suffb\@empty - \def\SNN{\rootb\Space\suffb}% - \if@nameauth@ShortSNN\let\SNN\rootb\fi - \fi - \@nameauth@West{\csab#4}% + \global\@nameauth@FullNamefalse% + \global\@nameauth@FirstNamefalse% + \global\@nameauth@FirstFormatfalse% \fi \fi } \newcommand*\@nameauth@NonWest[1] {% - \if@nameauth@BigLock\@nameauth@Lockfalse\fi - \if@nameauth@Lock - \unless\ifcsname#1\endcsname - \@nameauth@FirstFormattrue% - \fi - \if@nameauth@InAKA - \if@nameauth@AltAKA - \if@nameauth@OldAKA\@nameauth@EastFNtrue\fi - \@nameauth@FullNamefalse% - \@nameauth@FirstNametrue% - \else - \@nameauth@FullNametrue% - \@nameauth@FirstNamefalse% - \fi - \else - \unless\ifcsname#1\endcsname - \@nameauth@FullNametrue% - \@nameauth@FirstNamefalse% - \fi - \fi - \if@nameauth@FirstName - \@nameauth@FullNamefalse% - \fi + \ifdefined\@nameauth@InParser + \@nameauth@Form{#1}% \ifx\FNN\@empty \@nameauth@Hook{\SNN}% \else @@ -443,42 +578,12 @@ \fi \fi \fi - \unless\ifcsname#1\endcsname - \unless\if@nameauth@InAKA\csgdef{#1}{}\fi - \fi - \if@nameauth@OldReset - \@nameauth@FullNamefalse% - \@nameauth@FirstNamefalse% - \else - \global\@nameauth@FullNamefalse% - \global\@nameauth@FirstNamefalse% - \fi \fi } \newcommand*\@nameauth@West[1] {% - \if@nameauth@BigLock\@nameauth@Lockfalse\fi - \if@nameauth@Lock - \unless\ifcsname#1\endcsname - \@nameauth@FirstFormattrue% - \fi - \if@nameauth@InAKA - \if@nameauth@AltAKA - \@nameauth@FullNamefalse% - \@nameauth@FirstNametrue% - \else - \@nameauth@FullNametrue% - \@nameauth@FirstNamefalse% - \fi - \else - \unless\ifcsname#1\endcsname - \@nameauth@FullNametrue% - \@nameauth@FirstNamefalse% - \fi - \fi - \if@nameauth@FirstName - \@nameauth@FullNamefalse% - \fi + \ifdefined\@nameauth@InParser + \@nameauth@Form{#1}% \if@nameauth@FullName \if@nameauth@RevThis \@nameauth@Hook{\SNN\SpaceX\FNN}% @@ -497,184 +602,101 @@ \@nameauth@Hook{\rootb}% \fi \fi + \fi +} +\newcommand*\@nameauth@Form[1] +{% + \ifdefined\@nameauth@InParser \unless\ifcsname#1\endcsname - \unless\if@nameauth@InAKA\csgdef{#1}{}\fi - \fi - \if@nameauth@OldReset - \@nameauth@FullNamefalse% + \@nameauth@FirstFormattrue% + \@nameauth@FullNametrue% \@nameauth@FirstNamefalse% \else - \global\@nameauth@FullNamefalse% - \global\@nameauth@FirstNamefalse% + \if@nameauth@AlwaysFormat \@nameauth@FirstFormattrue\fi + \fi + \unless\if@nameauth@InAKA + \if@nameauth@FirstName \@nameauth@FullNamefalse\fi + \else + \if@nameauth@AltAKA + \if@nameauth@OldAKA \@nameauth@EastFNtrue\fi + \@nameauth@FullNamefalse% + \@nameauth@FirstNametrue% + \else + \@nameauth@FullNametrue% + \@nameauth@FirstNamefalse% + \fi + \unless\if@nameauth@AlwaysFormat + \unless\if@nameauth@AKAFormat + \@nameauth@FirstFormatfalse% + \fi + \fi \fi \fi } \newcommand*\@nameauth@Hook[1] {% - \if@nameauth@BigLock\@nameauth@Lockfalse\fi - \if@nameauth@Lock + \ifdefined\@nameauth@InParser \@nameauth@InHooktrue% \protected@edef\test{#1}% \expandafter\@nameauth@TestDot\expandafter{\test}% - \if@nameauth@InAKA - \if@nameauth@AlwaysFormat - \@nameauth@FirstFormattrue% + \if@nameauth@MainFormat + \if@nameauth@FirstFormat + \bgroup\NamesFormat{#1}\egroup% \else - \unless\if@nameauth@AKAFormat - \@nameauth@FirstFormatfalse\fi - \fi - \if@nameauth@MainFormat - \if@nameauth@FirstFormat - \bgroup\NamesFormat{#1}\egroup% - \else - \bgroup\MainNameHook{#1}\egroup% - \fi - \else - \if@nameauth@FirstFormat - \bgroup\FrontNamesFormat{#1}\egroup% - \else - \bgroup\FrontNameHook{#1}\egroup% - \fi + \bgroup\MainNameHook{#1}\egroup% \fi \else - \if@nameauth@AlwaysFormat - \@nameauth@FirstFormattrue% - \fi - \if@nameauth@MainFormat - \if@nameauth@FirstFormat - \bgroup\NamesFormat{#1}\egroup% - \else - \bgroup\MainNameHook{#1}\egroup% - \fi + \if@nameauth@FirstFormat + \bgroup\FrontNamesFormat{#1}\egroup% \else - \if@nameauth@FirstFormat - \bgroup\FrontNamesFormat{#1}\egroup% - \else - \bgroup\FrontNameHook{#1}\egroup% - \fi + \bgroup\FrontNameHook{#1}\egroup% \fi \fi - \if@nameauth@OldReset - \@nameauth@FirstFormatfalse% - \else - \global\@nameauth@FirstFormatfalse% - \fi \@nameauth@InHookfalse% \fi } \newcommand*\@nameauth@Index[2] {% - \let\ex\expandafter% \if@nameauth@DoIndex \ifcsname#1!TAG\endcsname - \protected@edef\Tag{\csname#1!TAG\endcsname}% - \ex\def\ex\ShortTag\ex{\ex\@nameauth@TrimTag\ex{\Tag}}% + \protected@edef\@nameauth@Tag{\csname#1!TAG\endcsname}% + \expandafter\def\expandafter\@nameauth@ShortTag\expandafter{% + \expandafter\@nameauth@TrimTag\expandafter{\@nameauth@Tag}}% \ifcsname#1!PRE\endcsname - \protected@edef\Pre{\csname#1!PRE\endcsname}% + \protected@edef\@nameauth@Pre{\csname#1!PRE\endcsname}% \if@nameauth@Xref - \protected@edef\Entry{\Pre#2\ShortTag}% + \protected@edef\@nameauth@IdxEntry% + {\@nameauth@Pre#2\@nameauth@ShortTag}% \else - \protected@edef\Entry{\Pre#2\Tag}% + \protected@edef\@nameauth@IdxEntry% + {\@nameauth@Pre#2\@nameauth@Tag}% \fi \else \if@nameauth@Xref - \protected@edef\Entry{#2\ShortTag}% + \protected@edef\@nameauth@IdxEntry% + {#2\@nameauth@ShortTag}% \else - \protected@edef\Entry{#2\Tag}% + \protected@edef\@nameauth@IdxEntry% + {#2\@nameauth@Tag}% \fi \fi \else \ifcsname#1!PRE\endcsname - \protected@edef\Pre{\csname#1!PRE\endcsname}% - \protected@edef\Entry{\Pre#2}% + \protected@edef\@nameauth@Pre{\csname#1!PRE\endcsname}% + \protected@edef\@nameauth@IdxEntry{\@nameauth@Pre#2}% \else - \protected@edef\Entry{#2}% + \protected@edef\@nameauth@IdxEntry{#2}% \fi \fi - \ex\index\ex{\Entry}% + \expandafter\NameauthIndex\expandafter{\@nameauth@IdxEntry}% \fi } -\newcommand*\@nameauth@Actual{@} -\newcommandx*\@nameauth@Debug[3][1=\@empty, 3=\@empty] +\newcommand*\CapThis{\@nameauth@DoCapstrue} +\newcommand*\AccentCapThis {% - \bgroup% - \def\index##1{##1}% - \@nameauth@DoIndextrue% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% - \@nameauth@Error{#2}{macro \string\@nameauth@Debug}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifdefined\ShortIdxEntry - \csundef{\csb!PRE}% - \csundef{\csb!TAG}% - \csundef{\csb!PN}% - \IndexName[#1]{#2}[#3]% - \else - \ifdefined\LongIdxEntry - \csundef{\csb!PN}% - \IndexName[#1]{#2}[#3]% - \else - \csb% - \fi - \fi - \else - \ifx\suffb\@empty - \ifdefined\ShortIdxEntry - \csundef{\csbc!PRE}% - \csundef{\csbc!TAG}% - \csundef{\csbc!PN}% - \IndexName[#1]{#2}[#3]% - \else - \ifdefined\LongIdxEntry - \csundef{\csbc!PN}% - \IndexName[#1]{#2}[#3]% - \else - \csbc% - \fi - \fi - \else - \ifdefined\ShortIdxEntry - \csundef{\csb!PRE}% - \csundef{\csb!TAG}% - \csundef{\csb!PN}% - \IndexName[#1]{#2}[#3]% - \else - \ifdefined\LongIdxEntry - \csundef{\csb!PN}% - \IndexName[#1]{#2}[#3]% - \else - \csb% - \fi - \fi - \fi - \fi - \else - \ifdefined\ShortIdxEntry - \csundef{\csab!PRE}% - \csundef{\csab!TAG}% - \csundef{\csab!PN}% - \IndexName[#1]{#2}[#3]% - \else - \ifdefined\LongIdxEntry - \csundef{\csab!PN}% - \IndexName[#1]{#2}[#3]% - \else - \csab% - \fi - \fi - \fi - \global\undef{\LongIdxEntry}% - \global\undef{\ShortIdxEntry}% - \egroup% + \@nameauth@Accenttrue% + \@nameauth@DoCapstrue% } -\newcommand*\CapThis{\@nameauth@DoCapstrue} -\newcommand*\AccentCapThis% - {\@nameauth@Accenttrue\@nameauth@DoCapstrue} \newcommand*\CapName{\@nameauth@AllThistrue} \newcommand*\AllCapsInactive{\@nameauth@AllCapsfalse} \newcommand*\AllCapsActive{\@nameauth@AllCapstrue} @@ -682,104 +704,133 @@ \newcommand*\ReverseInactive{\@nameauth@RevAllfalse} \newcommand*\ReverseActive{\@nameauth@RevAlltrue} \newcommand*\ForceFN{\@nameauth@EastFNtrue} -\newcommand*\RevComma% - {\@nameauth@RevThisCommatrue} -\newcommand*\ReverseCommaInactive% - {\@nameauth@RevAllCommafalse} -\newcommand*\ReverseCommaActive% - {\@nameauth@RevAllCommatrue} -\newcommand*\AltFormatActive{% +\newcommand*\RevComma{\@nameauth@RevThisCommatrue} +\newcommand*\ReverseCommaInactive{\@nameauth@RevAllCommafalse} +\newcommand*\ReverseCommaActive{\@nameauth@RevAllCommatrue} +\newcommand*\AltFormatActive +{% \global\@nameauth@AltFormattrue% \global\@nameauth@DoAlttrue% } -\WithSuffix{\newcommand*}\AltFormatActive*{% +\WithSuffix{\newcommand*}\AltFormatActive* +{% \global\@nameauth@AltFormattrue% \global\@nameauth@DoAltfalse% } -\newcommand*\AltFormatInactive{% +\newcommand*\AltFormatInactive +{% \global\@nameauth@AltFormatfalse% \global\@nameauth@DoAltfalse% } -\newcommand*\AltOn{% +\newcommand*\AltOn +{% \if@nameauth@InHook - \if@nameauth@AltFormat\@nameauth@DoAlttrue\fi + \if@nameauth@AltFormat + \@nameauth@DoAlttrue% + \fi \fi } -\newcommand*\AltOff{% +\newcommand*\AltOff +{% \if@nameauth@InHook - \if@nameauth@AltFormat\@nameauth@DoAltfalse\fi + \if@nameauth@AltFormat + \@nameauth@DoAltfalse% + \fi \fi } -\newcommand*\AltCaps[1]{% +\newcommand*\AltCaps[1] +{% \if@nameauth@InHook - \if@nameauth@DoCaps\MakeUppercase{#1}\else#1\fi - \else#1% + \if@nameauth@DoCaps + \MakeUppercase{#1}% + \else + #1% + \fi + \else + #1% + \fi +} +\newcommand*\textSC[1] +{% + \if@nameauth@DoAlt + \textsc{#1}% + \else + #1% + \fi +} +\newcommand*\textUC[1] +{% + \if@nameauth@DoAlt + \MakeUppercase{#1}% + \else + #1% + \fi +} +\newcommand*\textIT[1] +{% + \if@nameauth@DoAlt + \textit{#1}% + \else + #1% + \fi +} +\newcommand*\textBF[1] +{% + \if@nameauth@DoAlt + \textbf{#1}% + \else + #1% \fi } -\newcommand*\textSC[1]{% - \if@nameauth@DoAlt\textsc{#1}\else#1\fi} -\newcommand*\textUC[1]{% - \if@nameauth@DoAlt\MakeUppercase{#1}\else#1\fi} -\newcommand*\textIT[1]{% - \if@nameauth@DoAlt\textit{#1}\else#1\fi} -\newcommand*\textBF[1]{% - \if@nameauth@DoAlt\textbf{#1}\else#1\fi} \newcommand*\ShowComma{\@nameauth@ShowCommatrue} \newcommand*\NoComma{\@nameauth@NoCommatrue} \newcommand*\DropAffix{\@nameauth@ShortSNNtrue} \newcommand*\KeepAffix{\@nameauth@NBSPtrue} -\newcommand*\KeepName{\@nameauth@NBSPtrue\@nameauth@NBSPXtrue} +\newcommand*\KeepName +{% + \@nameauth@NBSPtrue% + \@nameauth@NBSPXtrue% +} \newcommand*\NamesInactive{\@nameauth@MainFormatfalse} \newcommand*\NamesActive{\@nameauth@MainFormattrue} \newcommand*\ForgetThis{\@nameauth@Forgettrue} \newcommand*\SubvertThis{\@nameauth@Subverttrue} \newcommand*\ForceName{\@nameauth@FirstFormattrue} +\newcommand*\LocalNameTest{\global\@nameauth@GlobalScopefalse} +\newcommand*\GlobalNameTest{\global\@nameauth@GlobalScopetrue} \newcommand*\LocalNames{\global\@nameauth@LocalNamestrue} \newcommand*\GlobalNames{\global\@nameauth@LocalNamesfalse} +\newcommand*\IndexActual[1]{\def\@nameauth@Actual{#1}} \newcommand*\IndexInactive{\@nameauth@DoIndexfalse} +\newcommand*\IndexActive{\@nameauth@DoIndextrue} \newcommand*\SkipIndex{\@nameauth@SkipIndextrue} \newcommand*\JustIndex{\@nameauth@JustIndextrue} -\newcommand*\IndexActive{\@nameauth@DoIndextrue} -\newcommand*\IndexActual[1] - {\global\renewcommand*\@nameauth@Actual{#1}} \newcommand*\SeeAlso{\@nameauth@SeeAlsotrue} \newcommand*\ShowPattern{\@nameauth@Debug} -\newcommand*\ShowIdxPageref% - {\def\LongIdxEntry{}\ShowPattern} -\WithSuffix{\newcommand*}\ShowIdxPageref*% - {\def\ShortIdxEntry{}\ShowPattern} +\newcommand*\ShowIdxPageref +{% + \global\@nameauth@IdxDebugtrue% + \global\@nameauth@LongIdxDebugtrue% + \@nameauth@Debug% +} +\WithSuffix{\newcommand*}\ShowIdxPageref* +{% + \global\@nameauth@IdxDebugtrue% + \@nameauth@Debug% +} \newcommand*\NameParser {% \if@nameauth@InHook \let\SNN\rootb% - \ifx\arga\@empty + \@nameauth@Choice% + {% \ifx\argc\@empty \let\FNN\suffb% \else \let\FNN\argc% \fi - \ifx\suffb\@empty - \ifx\FNN\@empty - \SNN% - \else - \if@nameauth@FullName% - \if@nameauth@RevThis - \FNN\Space\SNN% - \else - \SNN\Space\FNN% - \fi - \else - \if@nameauth@FirstName - \if@nameauth@EastFN - \FNN% - \else - \SNN% - \fi - \else - \SNN% - \fi - \fi - \fi + \ifx\FNN\@empty + \SNN% \else \if@nameauth@FullName \if@nameauth@RevThis @@ -799,7 +850,28 @@ \fi \fi \fi - \else + }% + {% + \let\FNN\argc% + \if@nameauth@FullName% + \if@nameauth@RevThis + \FNN\Space\SNN% + \else + \SNN\Space\FNN% + \fi + \else + \if@nameauth@FirstName + \if@nameauth@EastFN + \FNN% + \else + \SNN% + \fi + \else + \SNN% + \fi + \fi + }% + {% \ifx\argc\@empty \let\FNN\arga% \else @@ -807,7 +879,9 @@ \fi \unless\ifx\suffb\@empty \def\SNN{\rootb\Space\suffb}% - \if@nameauth@ShortSNN\let\SNN\rootb\fi% + \if@nameauth@ShortSNN + \let\SNN\rootb% + \fi% \fi \if@nameauth@FullName \if@nameauth@RevThis @@ -827,15 +901,21 @@ \SNN% \fi \fi - \fi + }% \fi } \newcommand\Name{\NameauthName} -\WithSuffix{\newcommand*}\Name*% - {\@nameauth@FullNametrue\NameauthLName} -\newcommand\FName{\@nameauth@FirstNametrue\NameauthFName} -\WithSuffix{\newcommand*}\FName*% - {\@nameauth@FirstNametrue\NameauthFName} +\WithSuffix{\newcommand*}\Name* +{% + \@nameauth@FullNametrue% + \NameauthLName% +} +\newcommand\FName +{% + \@nameauth@FirstNametrue% + \NameauthFName% +} +\WithSuffix{\newcommand*}\FName*{\FName} \newcommand*\IndexProtect {% \@nameauth@DoIndexfalse% @@ -843,166 +923,314 @@ } \newcommandx*\IndexName[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\rootb{\@nameauth@Root{#2}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \protected@edef\argc{\trim@spaces{#3}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% + \def\@nameauth@space{ }% \@nameauth@Error{#2}{macro \string\IndexName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose + \if@nameauth@SkipIndex + \PackageWarning{nameauth}% + {\SkipIndex precedes \IndexName; check for problems}% + \unless\if@nameauth@OldReset + \@nameauth@SkipIndexfalse% + \fi + \fi + \unless\if@nameauth@OldReset + \if@nameauth@SeeAlso + \global\@nameauth@SeeAlsofalse% + \PackageWarning{nameauth}% + {\SeeAlso precedes \IndexName or a naming macro and was reset}% + \fi + \fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude \PackageWarning{nameauth}% - {macro \IndexName: XRef: #2 exists}% - \fi - \else - \ifx\suffb\@empty - \@nameauth@Index{\csb}{\rootb}% + {macro \IndexName: Exclusion: #2 exists}% \else - \@nameauth@Index{\csb}{\rootb\space\suffb}% + \PackageWarning{nameauth}% + {macro \IndexName: XRef: #2 exists}% \fi \fi \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IndexName: XRef: #2 #3 exists}% - \fi - \else - \@nameauth@Index{\csbc}{\rootb\space\argc}% - \fi + \ifx\@nameauth@SB\@empty + \@nameauth@Index{\@nameauth@csb}{\@nameauth@B}% \else - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IndexName: XRef: #2 exists}% - \fi + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B\@nameauth@space% + \@nameauth@SB}% + \fi + \fi + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \IndexName: Exclusion: #2 #3 exists}% \else - \@nameauth@Index{\csb}{\rootb\space\suffb}% + \PackageWarning{nameauth}% + {macro \IndexName: XRef: #2 #3 exists}% \fi \fi + \else + \@nameauth@Index{\@nameauth@csbc}% + {\@nameauth@B\@nameauth@space% + \@nameauth@C}% \fi - \else - \ifcsname\csab!PN\endcsname + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IndexName: XRef: #1 #2 exists}% + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \IndexName: Exclusion: #1 #2 exists}% + \else + \PackageWarning{nameauth}% + {macro \IndexName: XRef: #1 #2 exists}% + \fi \fi \else - \ifx\suffb\@empty - \@nameauth@Index{\csab}% - {\rootb,\space\arga}% + \ifx\@nameauth@SB\@empty + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space\@nameauth@A}% \else - \@nameauth@Index{\csab}% - {\rootb,\space\arga,\space\suffb}% + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A,\@nameauth@space\@nameauth@SB}% \fi \fi - \fi + }% } \newcommandx*\IndexRef[4][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\rootb{\@nameauth@Root{#2}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\target{#4}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% - \let\ex\expandafter% + \@nameauth@LoadArgs{#1}{#2}{#3}% + \protected@edef\@nameauth@Target{#4}% + \def\@nameauth@space{ }% \@nameauth@Error{#2}{macro \string\IndexRef}% \@nameauth@Xreftrue% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose + \if@nameauth@SkipIndex + \PackageWarning{nameauth}% + {\SkipIndex preceded \IndexRef; check for problems}% + \unless\if@nameauth@OldReset + \@nameauth@SkipIndexfalse% + \fi + \fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \IndexRef: Exclusion: #2 exists}% + \else \PackageWarning{nameauth}% {macro \IndexRef: XRef: #2 exists}% \fi - \else - \ifx\suffb\@empty - \if@nameauth@SeeAlso - \@nameauth@Index{\csb}{\rootb|seealso{\target}}% + \fi + \else + \ifx\@nameauth@SB\@empty + \if@nameauth@SeeAlso + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B|seealso{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% + \else + \unless\if@nameauth@OldSee + \unless\ifcsname\@nameauth@csb!MN\endcsname + \unless\ifcsname\@nameauth@csb!NF\endcsname + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #2 stops see ref.}% + \fi + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #2 stops see ref.}% + \fi \else - \@nameauth@Index{\csb}{\rootb|see{\target}}% + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IndexRef: Non-strict XRef #2 created}% + \fi + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% \fi + \fi + \else + \if@nameauth@SeeAlso + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B\@nameauth@space% + \@nameauth@SB|seealso{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% \else - \if@nameauth@SeeAlso - \@nameauth@Index{\csb}% - {\rootb\space\suffb|seealso{\target}}% + \unless\if@nameauth@OldSee + \unless\ifcsname\@nameauth@csb!MN\endcsname + \unless\ifcsname\@nameauth@csb!NF\endcsname + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B\@nameauth@space% + \@nameauth@SB|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #2 stops see ref.}% + \fi + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #2 stops see ref.}% + \fi \else - \@nameauth@Index{\csb}% - {\rootb\space\suffb|see{\target}}% + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IndexRef: Non-strict XRef #2 created}% + \fi + \@nameauth@Index{\@nameauth@csb}% + {\@nameauth@B\@nameauth@space% + \@nameauth@SB|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csb!PN}{}% \fi \fi - \csgdef{\csb!PN}{}% \fi - \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IndexRef: XRef: #2 #3 exists}% - \fi + \fi + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \IndexRef: Exclusion: #2 #3 exists}% \else - \if@nameauth@SeeAlso - \@nameauth@Index{\csbc}% - {\rootb\space\argc|seealso{\target}}% - \else - \@nameauth@Index{\csbc}% - {\rootb\space\argc|see{\target}}% - \fi - \csgdef{\csbc!PN}{}% + \PackageWarning{nameauth}% + {macro \IndexRef: XRef: #2 #3 exists}% \fi + \fi + \else + \if@nameauth@SeeAlso + \@nameauth@Index{\@nameauth@csbc}% + {\@nameauth@B\@nameauth@space% + \@nameauth@C|seealso{\@nameauth@Target}}% + \csgdef{\@nameauth@csbc!PN}{}% \else - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose + \unless\if@nameauth@OldSee + \unless\ifcsname\@nameauth@csbc!MN\endcsname + \unless\ifcsname\@nameauth@csbc!NF\endcsname + \@nameauth@Index{\@nameauth@csbc}% + {\@nameauth@B\@nameauth@space% + \@nameauth@C|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csbc!PN}{}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #2 #3 stops see ref.}% + \fi + \else \PackageWarning{nameauth}% - {macro \IndexRef: XRef: #2 exists}% + {macro \IndexRef: Extant name #2 #3 stops see ref.}% \fi \else - \if@nameauth@SeeAlso - \@nameauth@Index{\csb}% - {\rootb\space\suffb|seealso{\target}}% - \else - \@nameauth@Index{\csb}% - {\rootb\space\suffb|see{\target}}% + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IndexRef: Non-strict XRef #2 #3 created}% \fi - \csgdef{\csb!PN}{}% + \@nameauth@Index{\@nameauth@csbc}% + {\@nameauth@B\@nameauth@space% + \@nameauth@C|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csbc!PN}{}% \fi \fi \fi - \else - \ifcsname\csab!PN\endcsname + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IndexRef: XRef: #1 #2 exists}% + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \IndexRef: Exclusion: #1 #2 exists}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: XRef: #1 #2 exists}% + \fi \fi \else - \ifx\suffb\@empty + \ifx\@nameauth@SB\@empty \if@nameauth@SeeAlso - \@nameauth@Index{\csab}% - {\rootb,\space\arga|seealso{\target}}% + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A|seealso{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% \else - \@nameauth@Index{\csab}% - {\rootb,\space\arga|see{\target}}% + \unless\if@nameauth@OldSee + \unless\ifcsname\@nameauth@csab!MN\endcsname + \unless\ifcsname\@nameauth@csab!NF\endcsname + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #1 #2 stops see ref.}% + \fi + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #1 #2 stops see ref.}% + \fi + \else + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IndexRef: Non-strict XRef #1 #2 created}% + \fi + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% + \fi \fi \else \if@nameauth@SeeAlso - \@nameauth@Index{\csab}% - {\rootb,\space\arga,\space\suffb|seealso{\target}}% + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A,\@nameauth@space% + \@nameauth@SB|seealso{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% \else - \@nameauth@Index{\csab}% - {\rootb,\space\arga,\space\suffb|see{\target}}% + \unless\if@nameauth@OldSee + \unless\ifcsname\@nameauth@csab!MN\endcsname + \unless\ifcsname\@nameauth@csab!NF\endcsname + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A,\@nameauth@space% + \@nameauth@SB|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #1 #2 stops see ref.}% + \fi + \else + \PackageWarning{nameauth}% + {macro \IndexRef: Extant name #1 #2 stops see ref.}% + \fi + \else + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IndexRef: Non-strict XRef #1 #2 created}% + \fi + \@nameauth@Index{\@nameauth@csab}% + {\@nameauth@B,\@nameauth@space% + \@nameauth@A,\@nameauth@space% + \@nameauth@SB|see{\@nameauth@Target}}% + \csgdef{\@nameauth@csab!PN}{}% + \fi \fi \fi - \csgdef{\csab!PN}{}% \fi - \fi + }% \@nameauth@Xreffalse% \if@nameauth@OldReset \@nameauth@SeeAlsofalse% @@ -1012,146 +1240,124 @@ } \newcommandx*\ExcludeName[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\ExcludeName}% - \ifx\arga\@empty - \ifx\argc\@empty + \@nameauth@Choice% + {% + \if@nameauth@Verbose + \ifcsname\@nameauth@csb!MN\endcsname + \PackageWarning{nameauth}% + {macro \ExcludeName: Name: #2 exists}% + \fi + \ifcsname\@nameauth@csb!NF\endcsname + \PackageWarning{nameauth}% + {macro \ExcludeName: Name: #2 exists}% + \fi + \fi + \ifcsname\@nameauth@csb!PN\endcsname \if@nameauth@Verbose - \ifcsname\csb!MN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 exists}% - \fi - \ifcsname\csb!NF\endcsname + {macro \ExcludeName: Exclusion: #2 exists}% + \else \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 exists}% + {macro \ExcludeName: XRef: #2 exists}% \fi \fi - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \ExcludeName: Xref: #2 exists}% - \fi - \else - \csgdef{\csb!PN}{!}% - \fi \else - \ifx\suffb\@empty - \if@nameauth@Verbose - \ifcsname\csbc!MN\endcsname - \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 #3 exists}% - \fi - \ifcsname\csbc!NF\endcsname - \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 #3 exists}% - \fi - \fi - \csgdef{\csbc!PN}{!}% - \ifcsname\csbc!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \ExcludeName: Xref: #2 #3 exists}% - \fi - \else - \csgdef{\csbc!PN}{!}% - \fi - \else - \if@nameauth@Verbose - \ifcsname\csb!MN\endcsname - \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 exists}% - \fi - \ifcsname\csb!NF\endcsname - \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #2 exists}% - \fi - \fi - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \ExcludeName: Xref: #2 exists}% - \fi + \csxdef{\@nameauth@csb!PN}{\@nameauth@Exclude}% + \fi + }% + {% + \if@nameauth@Verbose + \ifcsname\@nameauth@csbc!MN\endcsname + \PackageWarning{nameauth}% + {macro \ExcludeName: Name: #2 #3 exists}% + \fi + \ifcsname\@nameauth@csbc!NF\endcsname + \PackageWarning{nameauth}% + {macro \ExcludeName: Name: #2 #3 exists}% + \fi + \fi + \ifcsname\@nameauth@csbc!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \ExcludeName: Exclusion: #2 #3 exists}% \else - \csgdef{\csb!PN}{!}% + \PackageWarning{nameauth}% + {macro \ExcludeName: XRef: #2 #3 exists}% \fi \fi + \else + \csxdef{\@nameauth@csbc!PN}{\@nameauth@Exclude}% \fi - \else + }% + {% \if@nameauth@Verbose - \ifcsname\csab!MN\endcsname + \ifcsname\@nameauth@csab!MN\endcsname \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #1 #2 exists}% + {macro \ExcludeName: Name: #1 #2 exists}% \fi - \ifcsname\csab!NF\endcsname + \ifcsname\@nameauth@csab!NF\endcsname \PackageWarning{nameauth}% - {macro \ExcludeName: Reference: #1 #2 exists}% + {macro \ExcludeName: Name: #1 #2 exists}% \fi \fi - \ifcsname\csab!PN\endcsname + \ifcsname\@nameauth@csab!PN\endcsname \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \ExcludeName: Xref: #1 #2 exists}% + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \ExcludeName: Exclusion: #1 #2 exists}% + \else + \PackageWarning{nameauth}% + {macro \ExcludeName: XRef: #1 #2 exists}% + \fi \fi \else - \csgdef{\csab!PN}{!}% + \csxdef{\@nameauth@csab!PN}{\@nameauth@Exclude}% \fi - \fi + }% } \newcommandx*\IncludeName[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\IncludeName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname - \edef\testex{\csname\csb!PN\endcsname}% - \unless\ifx\testex\@empty\global\csundef{\csb!PN}% - \else - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IncludeName: Xref: #2 exists}% - \fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \global\csundef{\@nameauth@csb!PN}% + \else + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IncludeName: Xref: #2 exists}% \fi \fi - \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \edef\testex{\csname\csbc!PN\endcsname}% - \unless\ifx\testex\@empty\global\csundef{\csbc!PN}% - \else - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IncludeName: Xref: #2 #3 exists}% - \fi - \fi - \fi + \fi + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \global\csundef{\@nameauth@csbc!PN}% \else - \ifcsname\csb!PN\endcsname - \edef\testex{\csname\csb!PN\endcsname}% - \unless\ifx\testex\@empty\global\csundef{\csb!PN}% - \else - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \IncludeName: Xref: #2 exists}% - \fi - \fi + \if@nameauth@Verbose + \PackageWarning{nameauth}% + {macro \IncludeName: Xref: #2 #3 exists}% \fi \fi \fi - \else - \ifcsname\csab!PN\endcsname - \edef\testex{\csname\csab!PN\endcsname}% - \unless\ifx\testex\@empty\global\csundef{\csab!PN}% + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \global\csundef{\@nameauth@csab!PN}% \else \if@nameauth@Verbose \PackageWarning{nameauth}% @@ -1159,425 +1365,437 @@ \fi \fi \fi - \fi + }% } \WithSuffix{\newcommandx*}\IncludeName*[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\IncludeName*}% - \ifx\arga\@empty - \ifx\argc\@empty - \global\csundef{\csb!PN}% - \else - \ifx\suffb\@empty - \global\csundef{\csbc!PN}% - \else - \global\csundef{\csb!PN}% - \fi - \fi - \else - \global\csundef{\csab!PN}% - \fi + \@nameauth@Choice% + {\global\csundef{\@nameauth@csb!PN}}% + {\global\csundef{\@nameauth@csbc!PN}}% + {\global\csundef{\@nameauth@csab!PN}}% } \newcommandx*\PretagName[4][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\PretagName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname + \if@nameauth@Pretag + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \PretagName: tagging xref: #2}% + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \PretagName: tagging exclusion: #2}% + \else + \PackageWarning{nameauth}% + {macro \PretagName: tagging xref: #2}% + \fi \fi \fi - \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi - \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \if@nameauth@Verbose + \csgdef{\@nameauth@csb!PRE}{#4\@nameauth@Actual}% + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \PretagName: tagging exclusion: #2 #3}% + \else \PackageWarning{nameauth}% {macro \PretagName: tagging xref: #2 #3}% \fi \fi - \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi - \else - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose + \fi + \csgdef{\@nameauth@csbc!PRE}{#4\@nameauth@Actual}% + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude \PackageWarning{nameauth}% - {macro \PretagName: tagging xref: #2}% + {macro \PretagName: tagging exclusion: #1 #2}% + \else + \PackageWarning{nameauth}% + {macro \PretagName: tagging xref: #1 #2}% \fi \fi - \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi \fi - \fi + \csgdef{\@nameauth@csab!PRE}{#4\@nameauth@Actual}% + }% \else - \ifcsname\csab!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \PretagName: tagging xref: #1 #2}% - \fi - \fi - \if@nameauth@Pretag\csgdef{\csab!PRE}{#4\@nameauth@Actual}\fi + \PackageWarning{nameauth}% + {macro \PretagName: deactivated}% \fi } \newcommandx*\TagName[4][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\TagName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \TagName: not tagging exclusion: #2}% + \else \PackageWarning{nameauth}% {macro \TagName: not tagging xref: #2}% \fi - \else - \csgdef{\csb!TAG}{#4}% \fi \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \TagName: not tagging xref: #2 #3}% - \fi - \else - \csgdef{\csbc!TAG}{#4}% - \fi - \else - \ifcsname\csb!PN\endcsname - \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \TagName: not tagging xref: #2}% - \fi + \csgdef{\@nameauth@csb!TAG}{#4}% + \fi + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \if@nameauth@Verbose + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \TagName: not tagging exclusion: #2 #3}% \else - \csgdef{\csb!TAG}{#4}% + \PackageWarning{nameauth}% + {macro \TagName: not tagging xref: #2 #3}% \fi \fi + \else + \csgdef{\@nameauth@csbc!TAG}{#4}% \fi - \else - \ifcsname\csab!PN\endcsname + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname \if@nameauth@Verbose - \PackageWarning{nameauth}% - {macro \TagName: not tagging xref: #1 #2}% + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \PackageWarning{nameauth}% + {macro \TagName: not tagging exclusion: #1 #2}% + \else + \PackageWarning{nameauth}% + {macro \TagName: not tagging xref: #1 #2}% + \fi \fi \else - \csgdef{\csab!TAG}{#4}% + \csgdef{\@nameauth@csab!TAG}{#4}% \fi - \fi + }% } \newcommandx*\UntagName[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\UntagName}% - \ifx\arga\@empty - \ifx\argc\@empty - \global\csundef{\csb!TAG}% - \else - \ifx\suffb\@empty - \global\csundef{\csbc!TAG}% - \else - \global\csundef{\csb!TAG}% - \fi - \fi - \else - \global\csundef{\csab!TAG}% - \fi + \@nameauth@Choice% + {\global\csundef{\@nameauth@csb!TAG}}% + {\global\csundef{\@nameauth@csbc!TAG}}% + {\global\csundef{\@nameauth@csab!TAG}}% } \newcommandx\NameAddInfo[4][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\Suff{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\NameAddInfo}% - \ifx\arga\@empty - \ifx\argc\@empty - \csgdef{\csb!DB}{#4}% - \else - \ifx\Suff\@empty - \csgdef{\csbc!DB}{#4}% - \else - \csgdef{\csb!DB}{#4}% - \fi - \fi - \else - \csgdef{\csab!DB}{#4}% - \fi + \@nameauth@Choice% + {\csgdef{\@nameauth@csb!DB}{#4}}% + {\csgdef{\@nameauth@csbc!DB}{#4}}% + {\csgdef{\@nameauth@csab!DB}{#4}}% } \newcommandx*\NameQueryInfo[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\Suff{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% \unless\if@nameauth@BigLock + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\NameQueryInfo}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!DB\endcsname\csname\csb!DB\endcsname\fi - \else - \ifx\Suff\@empty - \ifcsname\csbc!DB\endcsname\csname\csbc!DB\endcsname\fi - \else - \ifcsname\csb!DB\endcsname\csname\csb!DB\endcsname\fi - \fi - \fi - \else - \ifcsname\csab!DB\endcsname\csname\csab!DB\endcsname\fi - \fi + \@nameauth@Choice% + {\ifcsname\@nameauth@csb!DB\endcsname + \csname\@nameauth@csb!DB\endcsname\fi}% + {\ifcsname\@nameauth@csbc!DB\endcsname + \csname\@nameauth@csbc!DB\endcsname\fi}% + {\ifcsname\@nameauth@csab!DB\endcsname + \csname\@nameauth@csab!DB\endcsname\fi}% \fi } \newcommandx*\NameClearInfo[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\Suff{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\NameClearInfo}% - \ifx\arga\@empty - \ifx\argc\@empty - \global\csundef{\csb!DB}% - \else - \ifx\Suff\@empty - \global\csundef{\csbc!DB}% - \else - \global\csundef{\csb!DB}% - \fi - \fi - \else - \global\csundef{\csab!DB}% - \fi + \@nameauth@Choice% + {\global\csundef{\@nameauth@csb!DB}}% + {\global\csundef{\@nameauth@csbc!DB}}% + {\global\csundef{\@nameauth@csab!DB}}% } \newcommandx\IfMainName[5][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\IfMainName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!MN\endcsname{#4}\else{#5}\fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!MN\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi \else - \ifx\suffb\@empty - \ifcsname\csbc!MN\endcsname{#4}\else{#5}\fi + \if@nameauth@GlobalScope + #5% \else - \ifcsname\csb!MN\endcsname{#4}\else{#5}\fi + {#5}% \fi \fi - \else - \ifcsname\csab!MN\endcsname{#4}\else{#5}\fi - \fi + }% + {% + \ifcsname\@nameauth@csbc!MN\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi + \else + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi + \fi + }% + {% + \ifcsname\@nameauth@csab!MN\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi + \else + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi + \fi + }% } \newcommandx\IfFrontName[5][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\IfFrontName}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!NF\endcsname{#4}\else{#5}\fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!NF\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi \else - \ifx\suffb\@empty - \ifcsname\csbc!NF\endcsname{#4}\else{#5}\fi + \if@nameauth@GlobalScope + #5% \else - \ifcsname\csb!NF\endcsname{#4}\else{#5}\fi + {#5}% \fi \fi - \else - \ifcsname\csab!NF\endcsname{#4}\else{#5}\fi - \fi + }% + {% + \ifcsname\@nameauth@csbc!NF\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi + \else + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi + \fi + }% + {% + \ifcsname\@nameauth@csab!NF\endcsname + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi + \else + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi + \fi + }% } \newcommandx\IfAKA[6][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\IfAKA}% - \ifx\arga\@empty - \ifx\argc\@empty - \ifcsname\csb!PN\endcsname - \edef\testex{\csname\csb!PN\endcsname}% - \ifx\testex\@empty{#4}\else{#6}\fi - \else{#5}\fi + \@nameauth@Choice% + {% + \ifcsname\@nameauth@csb!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csb!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \if@nameauth@GlobalScope + #6% + \else + {#6}% + \fi + \else + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi + \fi \else - \ifx\suffb\@empty - \ifcsname\csbc!PN\endcsname - \edef\testex{\csname\csbc!PN\endcsname}% - \ifx\testex\@empty{#4}\else{#6}\fi - \else{#5}\fi + \if@nameauth@GlobalScope + #5% \else - \ifcsname\csb!PN\endcsname - \edef\testex{\csname\csb!PN\endcsname}% - \ifx\testex\@empty{#4}\else{#6}\fi - \else{#5}\fi + {#5}% \fi \fi - \else - \ifcsname\csab!PN\endcsname - \edef\testex{\csname\csab!PN\endcsname}% - \ifx\testex\@empty{#4}\else{#6}\fi - \else{#5}\fi - \fi -} -\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty] -{% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% - \@nameauth@Error{#2}{macro \string\ForgetName}% - \ifx\arga\@empty - \ifx\argc\@empty - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \global\csundef{\csb!MN}% + }% + {% + \ifcsname\@nameauth@csbc!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csbc!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \if@nameauth@GlobalScope + #6% \else - \global\csundef{\csb!NF}% + {#6}% \fi \else - \global\csundef{\csb!MN}% - \global\csundef{\csb!NF}% + \if@nameauth@GlobalScope + #4% + \else + {#4}% + \fi \fi \else - \ifx\suffb\@empty - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \global\csundef{\csbc!MN}% - \else - \global\csundef{\csbc!NF}% - \fi + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi + \fi + }% + {% + \ifcsname\@nameauth@csab!PN\endcsname + \edef\@nameauth@testex{\csname\@nameauth@csab!PN\endcsname}% + \ifx\@nameauth@testex\@nameauth@Exclude + \if@nameauth@GlobalScope + #6% \else - \global\csundef{\csbc!MN}% - \global\csundef{\csbc!NF}% + {#6}% \fi \else - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \global\csundef{\csb!MN}% - \else - \global\csundef{\csb!NF}% - \fi + \if@nameauth@GlobalScope + #4% \else - \global\csundef{\csb!MN}% - \global\csundef{\csb!NF}% + {#4}% \fi \fi + \else + \if@nameauth@GlobalScope + #5% + \else + {#5}% + \fi \fi - \else + }% +} +\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty] +{% + \@nameauth@LoadArgs{#1}{#2}{#3}% + \@nameauth@Error{#2}{macro \string\ForgetName}% + \@nameauth@Choice% + {% \if@nameauth@LocalNames \if@nameauth@MainFormat - \global\csundef{\csab!MN}% + \global\csundef{\@nameauth@csb!MN}% \else - \global\csundef{\csab!NF}% + \global\csundef{\@nameauth@csb!NF}% \fi \else - \global\csundef{\csab!MN}% - \global\csundef{\csab!NF}% + \global\csundef{\@nameauth@csb!MN}% + \global\csundef{\@nameauth@csb!NF}% \fi - \fi + }% + {% + \if@nameauth@LocalNames + \if@nameauth@MainFormat + \global\csundef{\@nameauth@csbc!MN}% + \else + \global\csundef{\@nameauth@csbc!NF}% + \fi + \else + \global\csundef{\@nameauth@csbc!MN}% + \global\csundef{\@nameauth@csbc!NF}% + \fi + }% + {% + \if@nameauth@LocalNames + \if@nameauth@MainFormat + \global\csundef{\@nameauth@csab!MN}% + \else + \global\csundef{\@nameauth@csab!NF}% + \fi + \else + \global\csundef{\@nameauth@csab!MN}% + \global\csundef{\@nameauth@csab!NF}% + \fi + }% } \newcommandx*\SubvertName[3][1=\@empty, 3=\@empty] {% - \protected@edef\arga{\trim@spaces{#1}}% - \protected@edef\argc{\trim@spaces{#3}}% - \protected@edef\suffb{\@nameauth@Suffix{#2}}% - \def\csb{\@nameauth@Clean{#2}}% - \def\csbc{\@nameauth@Clean{#2,#3}}% - \def\csab{\@nameauth@Clean{#1!#2}}% + \@nameauth@LoadArgs{#1}{#2}{#3}% \@nameauth@Error{#2}{macro \string\SubvertName}% - \ifx\arga\@empty - \ifx\argc\@empty - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \csgdef{\csb!MN}{}% - \else - \csgdef{\csb!NF}{}% - \fi + \@nameauth@Choice% + {% + \if@nameauth@LocalNames + \if@nameauth@MainFormat + \csgdef{\@nameauth@csb!MN}{}% \else - \csgdef{\csb!MN}{}% - \csgdef{\csb!NF}{}% + \csgdef{\@nameauth@csb!NF}{}% \fi \else - \ifx\suffb\@empty - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \csgdef{\csbc!MN}{}% - \else - \csgdef{\csbc!NF}{}% - \fi - \else - \csgdef{\csbc!MN}{}% - \csgdef{\csbc!NF}{}% - \fi + \csgdef{\@nameauth@csb!MN}{}% + \csgdef{\@nameauth@csb!NF}{}% + \fi + }% + {% + \if@nameauth@LocalNames + \if@nameauth@MainFormat + \csgdef{\@nameauth@csbc!MN}{}% \else - \if@nameauth@LocalNames - \if@nameauth@MainFormat - \csgdef{\csb!MN}{}% - \else - \csgdef{\csb!NF}{}% - \fi - \else - \csgdef{\csb!MN}{}% - \csgdef{\csb!NF}{}% - \fi + \csgdef{\@nameauth@csbc!NF}{}% \fi + \else + \csgdef{\@nameauth@csbc!MN}{}% + \csgdef{\@nameauth@csbc!NF}{}% \fi - \else + }% + {% \if@nameauth@LocalNames \if@nameauth@MainFormat - \csgdef{\csab!MN}{}% + \csgdef{\@nameauth@csab!MN}{}% \else - \csgdef{\csab!NF}{}% + \csgdef{\@nameauth@csab!NF}{}% \fi \else - \csgdef{\csab!MN}{}% - \csgdef{\csab!NF}{}% + \csgdef{\@nameauth@csab!MN}{}% + \csgdef{\@nameauth@csab!NF}{}% \fi - \fi + }% } \newcommandx*\AKA[5][1=\@empty, 3=\@empty, 5=\@empty] {% - \if@nameauth@BigLock\@nameauth@Locktrue\fi + \if@nameauth@BigLock + \@nameauth@Locktrue% + \fi \unless\if@nameauth@Lock \@nameauth@Locktrue% \@nameauth@InAKAtrue% @@ -1589,142 +1807,139 @@ \@nameauth@Error{#2}{macro \string\AKA}% \@nameauth@Error{#4}{macro \string\AKA}% \leavevmode\hbox{}% - \protected@edef\argi{\trim@spaces{#1}}% - \protected@edef\rooti{\@nameauth@Root{#2}}% - \protected@edef\suffi{\@nameauth@Suffix{#2}}% - \@nameauth@Parse[#3]{#4}[#5]{!PN}% + \protected@edef\@nameauth@Ai{\trim@spaces{#1}}% + \protected@edef\@nameauth@Bi{\@nameauth@Root{#2}}% + \protected@edef\@nameauth@Si{\@nameauth@Suffix{#2}}% + \@nameauth@Parse{#3}{#4}{#5}{!PN}% + \def\@nameauth@space{ }% \unless\if@nameauth@SkipIndex - \ifx\argi\@empty - \ifx\suffi\@empty - \IndexRef[#3]{#4}[#5]{\rooti}% + \ifx\@nameauth@Ai\@empty + \ifx\@nameauth@Si\@empty + \IndexRef[#3]{#4}[#5]{\@nameauth@Bi}% \else - \IndexRef[#3]{#4}[#5]{\rooti\space\suffi}% + \IndexRef[#3]{#4}[#5]% + {\@nameauth@Bi\@nameauth@space% + \@nameauth@Si}% \fi \else - \ifx\suffi\@empty - \IndexRef[#3]{#4}[#5]{\rooti,\space\argi}% + \ifx\@nameauth@Si\@empty + \IndexRef[#3]{#4}[#5]% + {\@nameauth@Bi,\@nameauth@space\@nameauth@Ai}% \else - \IndexRef[#3]{#4}[#5]{\rooti,\space\argi,\space\suffi}% + \IndexRef[#3]{#4}[#5]% + {\@nameauth@Bi,\@nameauth@space% + \@nameauth@Ai,\@nameauth@space\@nameauth@Si}% \fi \fi \fi - \if@nameauth@OldReset - \@nameauth@SkipIndexfalse% - \@nameauth@AltAKAfalse% - \@nameauth@NBSPfalse% - \@nameauth@NBSPXfalse% - \@nameauth@DoCapsfalse% - \@nameauth@Accentfalse% - \@nameauth@AllThisfalse% - \@nameauth@ShowCommafalse% - \@nameauth@NoCommafalse% - \@nameauth@RevThisfalse% - \@nameauth@RevThisCommafalse% - \@nameauth@ShortSNNfalse% - \@nameauth@EastFNfalse% - \else - \global\@nameauth@SkipIndexfalse% - \global\@nameauth@AltAKAfalse% - \global\@nameauth@NBSPfalse% - \global\@nameauth@NBSPXfalse% - \global\@nameauth@DoCapsfalse% - \global\@nameauth@Accentfalse% - \global\@nameauth@AllThisfalse% - \global\@nameauth@ShowCommafalse% - \global\@nameauth@NoCommafalse% - \global\@nameauth@RevThisfalse% - \global\@nameauth@RevThisCommafalse% - \global\@nameauth@ShortSNNfalse% - \global\@nameauth@EastFNfalse% - \fi + \@nameauth@Flags% \@nameauth@Lockfalse% \@nameauth@InAKAfalse% \fi \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi } -\WithSuffix{\newcommand*}\AKA*{\@nameauth@AltAKAtrue\AKA} +\WithSuffix{\newcommand*}\AKA*{\@nameauth@AltAKAtrue \AKA} \newcommandx*\PName[5][1=\@empty,3=\@empty,5=\@empty] {% - \@nameauth@JustIndexfalse% + \if@nameauth@OldReset + \@nameauth@JustIndexfalse% + \else + \global\@nameauth@JustIndexfalse% + \fi \if@nameauth@SkipIndex - \NameauthName[#1]{#2}\space(\SkipIndex\AKA[#1]{#2}[#3]{#4}[#5])% + \unless\if@nameauth@OldReset + \global\@nameauth@SeeAlsofalse% + \fi + \NameauthName[#1]{#2} (\SkipIndex\AKA[#1]{#2}[#3]{#4}[#5])% \else - \NameauthName[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])% + \if@nameauth@SeeAlso + \@nameauth@SeeAlsofalse\NameauthName[#1]{#2} + \@nameauth@SeeAlsotrue(\AKA[#1]{#2}[#3]{#4}[#5])% + \else + \NameauthName[#1]{#2} + (\AKA[#1]{#2}[#3]{#4}[#5])% + \fi + \fi + \if@nameauth@SkipIndex + \PackageWarning{nameauth}% + {\SkipIndex still active after \PName; check for problems}% \fi } -\WithSuffix{\newcommand*}\PName*{\@nameauth@FullNametrue\PName} +\WithSuffix{\newcommand*}\PName*{\@nameauth@FullNametrue \PName} \newenvironment{nameauth}{% \begingroup% \let\ex\expandafter% \csdef{<}##1&##2&##3&##4>{% - \protected@edef\@arga{\trim@spaces{##1}}% - \protected@edef\@testb{\trim@spaces{##2}}% - \protected@edef\@testd{\trim@spaces{##4}}% - \@nameauth@etoksb\expandafter{##2}% - \@nameauth@etoksc\expandafter{##3}% - \@nameauth@etoksd\expandafter{##4}% - \ifx\@arga\@empty + \protected@edef\@arga@{\trim@spaces{##1}}% + \protected@edef\@larga@{L\trim@spaces{##1}}% + \protected@edef\@sarga@{S\trim@spaces{##1}}% + \protected@edef\@testb@{\trim@spaces{##2}}% + \protected@edef\@testd@{\trim@spaces{##4}}% + \@nameauth@etoksb\ex{##2}% + \@nameauth@etoksc\ex{##3}% + \@nameauth@etoksd\ex{##4}% + \ifx\@arga@\@empty \PackageError{nameauth}% {environment nameauth: Control sequence missing}% \fi \@nameauth@Error{##3}{environment nameauth}% - \ifcsname\@arga\endcsname + \ifcsname\@arga@\endcsname \PackageWarning{nameauth}% {environment nameauth: Shorthand macro already exists}% \fi - \ifx\@testd\@empty - \ifx\@testb\@empty - \ex\csgdef\ex{\ex\@arga\ex}% + \ifx\@testd@\@empty + \ifx\@testb@\@empty + \ex\csgdef\ex{\ex\@arga@\ex}% \ex{\ex\NameauthName\ex{\the\@nameauth@etoksc}}% - \ex\csgdef\ex{\ex L\ex\@arga\ex}% + \ex\csgdef\ex{\ex\@larga@\ex}% \ex{\ex\@nameauth@FullNametrue% \ex\NameauthLName\ex{\the\@nameauth@etoksc}}% - \ex\csgdef\ex{\ex S\ex\@arga\ex}% + \ex\csgdef\ex{\ex\@sarga@\ex}% \ex{\ex\@nameauth@FirstNametrue% \ex\NameauthFName\ex{\the\@nameauth@etoksc}}% \else - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}% + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga@\ex\ex\ex}% \ex\ex\ex{\ex\ex\ex\NameauthName% \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]% \ex{\the\@nameauth@etoksc}}% - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga% - \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue% + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@larga@\ex\ex\ex}% + \ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue% \ex\ex\ex\NameauthLName% \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]% \ex{\the\@nameauth@etoksc}}% - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga% - \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue% + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@sarga@\ex\ex\ex}% + \ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue% \ex\ex\ex\NameauthFName% \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]% \ex{\the\@nameauth@etoksc}}% \fi \else - \ifx\@testb\@empty - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}% + \ifx\@testb@\@empty + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga@\ex\ex\ex}% \ex\ex\ex{\ex\ex\ex\NameauthName% \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}% \ex[\the\@nameauth@etoksd]}% - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga% - \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue% + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@larga@\ex\ex\ex}% + \ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue% \ex\ex\ex\NameauthLName% \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}% \ex[\the\@nameauth@etoksd]}% - \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga% - \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue% + \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@sarga@\ex\ex\ex}% + \ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue% \ex\ex\ex\NameauthFName% \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}% \ex[\the\@nameauth@etoksd]}% \else \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{% - \ex\ex\ex\ex\ex\ex\ex\@arga\ex\ex\ex\ex\ex\ex\ex}% + \ex\ex\ex\ex\ex\ex\ex\@arga@\ex\ex\ex\ex\ex\ex\ex}% \ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\NameauthName% \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the% \ex\ex\ex\@nameauth@etoksb\ex\ex\ex]% \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}% \ex[\the\@nameauth@etoksd]}% \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{% - \ex\ex\ex\ex\ex\ex\ex L\ex\ex\ex\ex\ex\ex\ex\@arga% - \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{% + \ex\ex\ex\ex\ex\ex\ex\@larga@\ex\ex\ex\ex\ex\ex\ex}% + \ex\ex\ex\ex\ex\ex\ex{% \ex\ex\ex\ex\ex\ex\ex\@nameauth@FullNametrue% \ex\ex\ex\ex\ex\ex\ex\NameauthLName% \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex% @@ -1732,8 +1947,8 @@ \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}% \ex[\the\@nameauth@etoksd]}% \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{% - \ex\ex\ex\ex\ex\ex\ex S\ex\ex\ex\ex\ex\ex\ex\@arga% - \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{% + \ex\ex\ex\ex\ex\ex\ex\@sarga@\ex\ex\ex\ex\ex\ex\ex}% + \ex\ex\ex\ex\ex\ex\ex{% \ex\ex\ex\ex\ex\ex\ex\@nameauth@FirstNametrue% \ex\ex\ex\ex\ex\ex\ex\NameauthFName% \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex% @@ -1744,22 +1959,6 @@ \fi\ignorespaces% }\ignorespaces% }{\endgroup\ignorespaces} -%% -%% Copyright (C) 2020 by Charles P. Schaum <charles dot schaum@comcast.net> -%% -%% This work may be distributed and / or modified under the -%% conditions of the LaTeX Project Public License (LPPL), either -%% version 1.3c of this license or (at your option) any later -%% version. The latest version of this license is in the file: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% This work is "maintained" (as per LPPL maintenance status) by -%% Charles P. Schaum. -%% -%% This work consists of the files nameauth.dtx, examples.tex, and a Makefile. -%% These files generate README.txt / README, nameauth.ins, nameauth.sty, and -%% nameauth.pdf, with other intermediate files, as a part of this work. See -%% the README.txt or README for more information. +\endinput %% %% End of file `nameauth.sty'. |