diff options
author | Karl Berry <karl@freefriends.org> | 2012-02-19 23:31:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-02-19 23:31:18 +0000 |
commit | e036bb82b6b1baa3531e717263613877c92587d6 (patch) | |
tree | d52af783d57736ae2045f6b1486e0d934f5ded91 /Master/texmf-dist/tex/latex/nameauth | |
parent | 1654ebcda4ab17ae33b9a00d0261307c7a228adc (diff) |
nameauth 0.96 (19feb12)
git-svn-id: svn://tug.org/texlive/trunk@25429 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 | 122 |
1 files changed, 63 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty index 59d78f55211..c885879b27d 100644 --- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty +++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty @@ -22,11 +22,12 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{nameauth} - [2012/02/17 v0.95 name authority macros to aid consistent display and indexing of names] + [2012/02/19 v0.96 name authority macros to aid consistent display and indexing of names] + % %% \DescribeMacro{\IndexActive} \newif\if@nameauth@DoFormat -\newif\if@nameauth@DoComma \newif\if@nameauth@DoIndex +\newif\if@nameauth@DoComma \newif\if@nameauth@Comma \newif\if@nameauth@Punct \newif\if@nameauth@DoCaps @@ -67,10 +68,6 @@ \def\Test{#2}% \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi% } -\newcommand*{\@nameauth@NoComma}[1]% -{% - \@nameauth@Root{#1}\@nameauth@Suffix{#1}% -} \def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot} \def\@nameauth@EvalDot% {% @@ -100,10 +97,14 @@ \@nameauth@CR#1\relax% } \def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}} -\newcommand{\CapThis}{\@nameauth@DoCapstrue} +\newcommand{\CapThis}% +{% + \@nameauth@DoCapstrue% +} \DeclareDocumentCommand\Name{s o m o}% {% - \def\Surnames{#3}% + \edef\Surnames{#3}% + \def\ISurnames{#3}% \if@nameauth@DoCaps% \def\Shortnames{\@nameauth@CapRoot{#3,}}% \else% @@ -113,44 +114,45 @@ \@nameauth@CheckComma{#3}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\ISurnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \fi% \IfValueTF{#2}% {\IfValueTF{#4}% - {\edef\Forenames{#4}}{\edef\Forenames{#2}}% + {\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}% - { \bsc Name Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #2 #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames, #2}}% + \@nameauth@Index{\ISurnames, #2}}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #2}% + \@nameauth@Index{\ISurnames, #2}% \fi% \fi% \fi}% @@ -159,35 +161,35 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 #4 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 #4 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \else% \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}% - \@nameauth@Index{\Surnames\space#4}}% + \@nameauth@Index{\ISurnames\space#4}}% \else% \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#4}% - \@nameauth@Index{\Surnames\space#4}% + \@nameauth@Index{\ISurnames\space#4}% \fi% \fi% \fi}% @@ -195,34 +197,34 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc Name Cross-reference: #3 cannot be a page reference.}% + {\bsc Name Cross-reference: #3 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname% \IfBooleanTF{#1}% {\expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% {\@nameauth@FmtName*{\Shortnames}% - \@nameauth@Index{\Surnames}}% + \@nameauth@Index{\ISurnames}}% \else% \csgdef{\@nameauth@CleanName{#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -231,11 +233,13 @@ } \DeclareDocumentCommand\FName{o m o}% {% - \def\Surnames{#2}% + \edef\Surnames{#2}% + \def\ISurnames{#2}% \if@nameauth@DoComma\else% \@nameauth@CheckComma{#2}% \if@nameauth@Comma% \edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% + \def\ISurnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}% \fi% \fi% \IfValueTF{#1}% @@ -244,29 +248,29 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #1 #2 cannot be a page reference.}% + {\bsc FName Cross-reference: #1 #2 cannot be a page reference.}% \else% \if@nameauth@DoFormat% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{% \expandafter\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \else% \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Forenames\expandafter\space\Surnames}% - \@nameauth@Index{\Surnames, #1}% + \@nameauth@Index{\ISurnames, #1}% \fi% \fi% \fi}% @@ -275,27 +279,27 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 #3 cannot be a page reference.}% + {\bsc 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@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}% \expandafter\@nameauth@FmtName% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \else% \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames\space#3}% - \@nameauth@Index{\Surnames\space#3}% + \@nameauth@Index{\ISurnames\space#3}% \fi% \fi% \fi}% @@ -303,26 +307,26 @@ \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% \PackageWarning{nameauth}% - { \bsc FName Cross-reference: #2 cannot be a page reference.}% + {\bsc 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@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!MN!}}{}% \expandafter\@nameauth@FmtName\expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \@nameauth@FmtName*{\@nameauth@Root{#2,}}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \else% \csgdef{\@nameauth@CleanName{#2!NF!}}{}% \expandafter\@nameauth@FmtName\expandafter*% \expandafter{\Surnames}% - \@nameauth@Index{\Surnames}% + \@nameauth@Index{\ISurnames}% \fi% \fi% \fi}% @@ -336,11 +340,11 @@ \if@nameauth@DoComma\else% \@nameauth@CheckComma{#3}% \if@nameauth@Comma% - \edef\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% + \def\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}% \fi% \@nameauth@CheckComma{#5}% \if@nameauth@Comma% - \edef\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% + \def\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}% \fi% \fi% \IfValueTF{#4}% @@ -376,11 +380,11 @@ \else% \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 #6 already exists; no see ref.}% + {\bsc AKA Name reference: #5 #6 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}% \IfValueTF{#2}% @@ -394,11 +398,11 @@ \else% \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc AKA Name reference: #5 already exists; no see ref.}% + {\bsc AKA Name reference: #5 already exists; no see ref.}% \else% \csgdef{\@nameauth@CleanName{#5!PN!}}{}% \IfValueTF{#2}% @@ -446,15 +450,15 @@ {% \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName XRef: #1 #2 exists.}% + {\bsc ExcludeName XRef: #1 #2 exists.}% \else% \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}% \fi% @@ -465,11 +469,11 @@ \else% \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}% \fi% @@ -479,11 +483,11 @@ \else% \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname% \PackageWarning{nameauth}% - { \bsc ExcludeName Reference: #2 already exists; no exclusion.}% + {\bsc ExcludeName Reference: #2 already exists; no exclusion.}% \else% \csgdef{\@nameauth@CleanName{#2!PN!}}{}% \fi% |