summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nameauth
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-02 22:26:53 +0000
committerKarl Berry <karl@freefriends.org>2015-12-02 22:26:53 +0000
commite34b6a9f256ced4540530861f54bb1fcb0b780d6 (patch)
treedaf54f408efb34c01f762a3c43dfa6f3ad23a32c /Master/texmf-dist/tex/latex/nameauth
parent8612f7f48afa4bd985eb1ba2824afc9bc0d9737f (diff)
nameauth (2dec15)
git-svn-id: svn://tug.org/texlive/trunk@39001 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nameauth')
-rw-r--r--Master/texmf-dist/tex/latex/nameauth/nameauth.sty42
1 files changed, 23 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
index e2c6e357f59..368cfdd626a 100644
--- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
+++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{nameauth}
- [2015/11/29 v2.11 Name authority mechanism for consistency in text and index]
+ [2015/12/01 v2.2 Name authority mechanism for consistency in text and index]
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
\newif\if@nameauth@DoFormat
@@ -35,7 +35,9 @@
\newif\if@nameauth@Punct
\newif\if@nameauth@DoCaps
\newif\if@nameauth@Accent
-\def\@nameauth@Actual{@}
+\newcommand*{\NamesFormat}{}
+\newcommand*{\NameauthName}{\Name}
+\newcommand*{\NameauthFName}{\FName}
\DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
@@ -53,10 +55,10 @@
\DeclareOption{notreversed}%
{\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
-\DeclareOption{smallcaps}{\newcommand*{\NamesFormat}{\scshape}}
-\DeclareOption{italic}{\newcommand*{\NamesFormat}{\itshape}}
-\DeclareOption{boldface}{\newcommand*{\NamesFormat}{\bfseries}}
-\DeclareOption{noformat}{\newcommand*{\NamesFormat}{}}
+\DeclareOption{smallcaps}{\renewcommand*{\NamesFormat}{\scshape}}
+\DeclareOption{italic}{\renewcommand*{\NamesFormat}{\itshape}}
+\DeclareOption{boldface}{\renewcommand*{\NamesFormat}{\bfseries}}
+\DeclareOption{noformat}{\renewcommand*{\NamesFormat}{}}
\ExecuteOptions%
{nocomma,%
mainmatter,%
@@ -72,6 +74,7 @@
\RequirePackage{suffix}
\RequirePackage{trimspaces}
\RequirePackage{xargs}
+\newcommand*\@nameauth@Actual{@}
\newcommand*{\@nameauth@Clean}[1]%
{\expandafter\zap@space\detokenize{#1} \@empty}
\newcommand*{\@nameauth@Root}[1]%
@@ -165,7 +168,8 @@
{\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
\newcommand*{\IndexInactive}{\@nameauth@DoIndexfalse}
\newcommand*{\IndexActive}{\@nameauth@DoIndextrue}
-\newcommand*{\IndexActual}[1]{\gdef\@nameauth@Actual{#1}}
+\newcommand*{\IndexActual}[1]%
+ {\global\renewcommand*\@nameauth@Actual{#1}}
\newcommandx*\Name[3][1=\@empty, 3=\@empty]%
{%
\let\ex\expandafter%
@@ -1070,47 +1074,47 @@
\fi
\ifx\testd\@empty
\ifx\testb\@empty
- \ex\csgdef\ex{\ex\arga\ex}\ex{\ex\Name\ex{\the\tokc}}%
- \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\Name\ex*\ex{\the\tokc}}%
- \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\FName\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex\arga\ex}\ex{\ex\NameauthName\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\NameauthName\ex*\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\NameauthFName\ex{\the\tokc}}%
\else
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
- \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex[\ex\the\ex\tokb\ex]%
+ \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex[\ex\the\ex\tokb\ex]%
\ex{\the\tokc}}%
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
- \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex*%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex*%
\ex\ex\ex[\ex\the\ex\tokb\ex]\ex{\the\tokc}}%
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\arga%
- \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\FName\ex\ex\ex[%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\NameauthFName\ex\ex\ex[%
\ex\the\ex\tokb\ex]\ex{\the\tokc}}%
\fi
\else
\ifx\testb\@empty
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
- \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex{\ex\the\ex\tokc\ex}%
+ \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex{\ex\the\ex\tokc\ex}%
\ex[\the\tokd]}%
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
- \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\NameauthName%
\ex\ex\ex*\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
\ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S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