summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nameauth
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-09 22:38:05 +0000
committerKarl Berry <karl@freefriends.org>2016-04-09 22:38:05 +0000
commitf880b8f77e01ea7cba9f1e28686a7c6c25c93bad (patch)
tree7e784e5d2d6f7e094fe017c3d4e7b2d3b97273dd /Master/texmf-dist/tex/latex/nameauth
parent98ce05a45b8e9828ed278745b2cedb41229dbda9 (diff)
nameauth (9apr16)
git-svn-id: svn://tug.org/texlive/trunk@40369 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nameauth')
-rw-r--r--Master/texmf-dist/tex/latex/nameauth/nameauth.sty125
1 files changed, 83 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
index d5e44e32cb6..07a991732b0 100644
--- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
+++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
@@ -14,10 +14,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{nameauth}
- [2016/03/18 v2.42 Name authority mechanism for consistency in text and index]
+ [2016/04/06 v2.5 Name authority mechanism for consistency in text and index]
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
-\newif\if@nameauth@DoFormat
+\newif\if@nameauth@MainFormat
+\newif\if@nameauth@AKAFormat
\newif\if@nameauth@LocalNames
\newif\if@nameauth@DoIndex
\newif\if@nameauth@Pretag
@@ -41,6 +42,7 @@
\newif\if@nameauth@Lock
\newcommand*{\NamesFormat}{}
\newcommand*{\MainNameHook}{}
+\newcommand*{\FrontNamesFormat}{}
\newcommand*{\FrontNameHook}{}
\newcommand*{\NameauthName}{\@nameauth@Name}
\newcommand*{\NameauthLName}{\@nameauth@Name}
@@ -53,8 +55,9 @@
\newtoks\@nameauth@etoksd%
\DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
-\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
-\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
+\DeclareOption{mainmatter}{\@nameauth@MainFormattrue}
+\DeclareOption{frontmatter}{\@nameauth@MainFormatfalse}
+\DeclareOption{formatAKA}{\@nameauth@AKAFormattrue}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
\DeclareOption{pretag}{\@nameauth@Pretagtrue}
@@ -79,7 +82,7 @@
pretag,%
normalcaps,%
notreversed,%
- smallcaps}
+ noformat}
\ProcessOptions\relax
\RequirePackage{etoolbox}
\RequirePackage{ifluatex}
@@ -129,16 +132,42 @@
{\let\@period=.\ifx\@token\@period\expandafter\@gobble \fi}
\newcommand*{\@nameauth@FmtName}[1]%
{%
- \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
- \@nameauth@TestDot{#1}%
- \if@nameauth@DoFormat
- \if@nameauth@FirstFormat
- \bgroup\NamesFormat{#1}\egroup%
+ \if@nameauth@InAKA
+ \if@nameauth@AlwaysFormat
+ \@nameauth@FirstFormattrue%
\else
- \bgroup\MainNameHook{#1}\egroup%
+ \if@nameauth@AKAFormat\else\@nameauth@FirstFormatfalse\fi
+ \fi
+ \@nameauth@TestDot{#1}%
+ \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
\fi
\else
- \bgroup\FrontNameHook{#1}\egroup%
+ \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
+ \@nameauth@TestDot{#1}%
+ \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
+ \fi
\fi
}
\newcommand*\@nameauth@Actual{@}
@@ -266,14 +295,12 @@
\else
\@nameauth@Index{\csb}{\IndexSNN}%
\fi
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\ifcsname\csb!MN\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
@@ -282,9 +309,11 @@
\else
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
\else
\@nameauth@FirstFormattrue%
- \@nameauth@FullNamefalse%
+ \@nameauth@FullNametrue%
\@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
@@ -292,15 +321,14 @@
\ex\@nameauth@FmtName\ex{\SNN}%
\fi
\csgdef{\csb!MN}{}%
+ \@nameauth@FullNamefalse%
\fi
\else
\ifcsname\csb!NF\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
@@ -309,15 +337,19 @@
\else
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
- \else
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
+ \else
+ \@nameauth@FirstFormattrue%
+ \@nameauth@FullNametrue%
+ \@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
\ex\@nameauth@FmtName\ex{\SNN}%
\fi
\csgdef{\csb!NF}{}%
+ \@nameauth@FullNamefalse%
\fi
\fi
\else
@@ -327,14 +359,12 @@
\else
\@nameauth@Index{\csbc}{\IndexSNN\ISpace\argc}%
\fi
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\ifcsname\csbc!MN\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
\else
@@ -347,9 +377,11 @@
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
\fi
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
\else
\@nameauth@FirstFormattrue%
- \@nameauth@FullNamefalse%
+ \@nameauth@FullNametrue%
\@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
@@ -357,15 +389,14 @@
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
\fi
\csgdef{\csbc!MN}{}%
+ \@nameauth@FullNamefalse%
\fi
\else
\ifcsname\csbc!NF\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
\else
@@ -378,15 +409,19 @@
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
\fi
- \else
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
+ \else
+ \@nameauth@FirstFormattrue%
+ \@nameauth@FullNametrue%
+ \@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
\else
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
\fi
\csgdef{\csbc!NF}{}%
+ \@nameauth@FullNamefalse%
\fi
\fi
\fi
@@ -411,15 +446,13 @@
\@nameauth@Index{\csab}{\IndexShort,\space\arga,\space\Suff}%
\fi
\fi
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\ifcsname\csab!MN\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\let\PrintShort\FNN%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
\else
@@ -428,9 +461,11 @@
\else
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
\else
\@nameauth@FirstFormattrue%
- \@nameauth@FullNamefalse%
+ \@nameauth@FullNametrue%
\@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
@@ -438,16 +473,15 @@
\ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
\fi
\csgdef{\csab!MN}{}%
+ \@nameauth@FullNamefalse%
\fi
\else
\ifcsname\csab!NF\endcsname
\if@nameauth@FirstName
\@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
\let\PrintShort\FNN%
\fi
\if@nameauth@FullName
- \@nameauth@FullNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
\else
@@ -456,15 +490,19 @@
\else
\ex\@nameauth@FmtName\ex{\PrintShort}%
\fi
- \else
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
+ \else
+ \@nameauth@FirstFormattrue%
+ \@nameauth@FullNametrue%
+ \@nameauth@FirstNamefalse%
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
\else
\ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
\fi
\csgdef{\csab!NF}{}%
+ \@nameauth@FullNamefalse%
\fi
\fi
\fi
@@ -497,8 +535,8 @@
{\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
\newcommand*{\ShowComma}{\@nameauth@ShowCommatrue}
\newcommand*{\KeepAffix}{\@nameauth@NBSPtrue}
-\newcommand*{\NamesInactive}{\@nameauth@DoFormatfalse}
-\newcommand*{\NamesActive}{\@nameauth@DoFormattrue}
+\newcommand*{\NamesInactive}{\@nameauth@MainFormatfalse}
+\newcommand*{\NamesActive}{\@nameauth@MainFormattrue}
\newcommand*\LocalNames{\global\@nameauth@LocalNamestrue}
\newcommand*\GlobalNames{\global\@nameauth@LocalNamesfalse}
\newcommand*{\IndexInactive}{\@nameauth@DoIndexfalse}
@@ -645,6 +683,7 @@
\protected@edef\Space{,\nobreakspace}%
\fi
\fi
+ \ifcsname\csd!PN\endcsname\else\@nameauth@FirstFormattrue\fi
\if@nameauth@RevThis
\ex\@nameauth@FmtName\ex{\Reversed}%
\else
@@ -686,6 +725,7 @@
\protected@edef\Space{,\nobreakspace}%
\fi
\fi
+ \ifcsname\csde!PN\endcsname\else\@nameauth@FirstFormattrue\fi
\if@nameauth@AltAKA
\ex\@nameauth@FmtName\ex{\arge}%
\else
@@ -750,6 +790,7 @@
\else
\let\FNN\arge%
\fi
+ \ifcsname\cscd!PN\endcsname\else\@nameauth@FirstFormattrue\fi
\if@nameauth@AltAKA
\ex\@nameauth@FmtName\ex{\FNN}%
\else
@@ -1218,7 +1259,7 @@
\ifx\testa\@empty
\ifx\testc\@empty
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\global\csundef{\csb!MN}%
\else
\global\csundef{\csb!NF}%
@@ -1229,7 +1270,7 @@
\fi
\else
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\global\csundef{\csbc!MN}%
\else
\global\csundef{\csbc!NF}%
@@ -1241,7 +1282,7 @@
\fi
\else
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\global\csundef{\csab!MN}%
\else
\global\csundef{\csab!NF}%
@@ -1272,7 +1313,7 @@
\ifx\testa\@empty
\ifx\testc\@empty
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\csgdef{\csb!MN}{}%
\else
\csgdef{\csb!NF}{}%
@@ -1283,7 +1324,7 @@
\fi
\else
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\csgdef{\csbc!MN}{}%
\else
\csgdef{\csbc!NF}{}%
@@ -1295,7 +1336,7 @@
\fi
\else
\if@nameauth@LocalNames
- \if@nameauth@DoFormat
+ \if@nameauth@MainFormat
\csgdef{\csab!MN}{}%
\else
\csgdef{\csab!NF}{}%
@@ -1407,7 +1448,7 @@
%% This work is "maintained" (as per LPPL maintenance status) by
%% Charles P. Schaum.
%%
-%% This work consists of the file nameauth.dtx and a Makefile.
+%% This work consists of the files nameauth.dtx, examples.tex, and a Makefile.
%% Running "make" generates the derived files README, nameauth.pdf and nameauth.sty.
%% Running "make inst" installs the files in the user's TeX tree.
%% Running "make install" installs the files in the local TeX tree.