diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-09 22:38:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-09 22:38:05 +0000 |
commit | f880b8f77e01ea7cba9f1e28686a7c6c25c93bad (patch) | |
tree | 7e784e5d2d6f7e094fe017c3d4e7b2d3b97273dd /Master/texmf-dist/doc/latex/nameauth | |
parent | 98ce05a45b8e9828ed278745b2cedb41229dbda9 (diff) |
nameauth (9apr16)
git-svn-id: svn://tug.org/texlive/trunk@40369 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/nameauth')
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/Makefile | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/README | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/README.txt | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/examples.tex | 179 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/nameauth/nameauth.pdf | bin | 804568 -> 817013 bytes |
5 files changed, 188 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/latex/nameauth/Makefile b/Master/texmf-dist/doc/latex/nameauth/Makefile index e3989ed9cba..67fcb7ed051 100644 --- a/Master/texmf-dist/doc/latex/nameauth/Makefile +++ b/Master/texmf-dist/doc/latex/nameauth/Makefile @@ -28,13 +28,15 @@ inst: all cp Makefile $(UTREE)/source/latex/$(NAME) cp $(NAME).sty $(UTREE)/tex/latex/$(NAME) cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME) + cp examples.tex $(UTREE)/doc/latex/$(NAME) install: all sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME) sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME) sudo cp Makefile $(LOCAL)/source/latex/$(NAME) sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME) sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME) + sudo cp examples.tex $(LOCAL)/doc/latex/$(NAME) zip: all ln -sf . $(NAME) - zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,Makefile,$(NAME).{pdf,dtx}} + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,examples.tex,Makefile,$(NAME).{pdf,dtx}} rm $(NAME) diff --git a/Master/texmf-dist/doc/latex/nameauth/README b/Master/texmf-dist/doc/latex/nameauth/README index 1063131bddd..9729f7af648 100644 --- a/Master/texmf-dist/doc/latex/nameauth/README +++ b/Master/texmf-dist/doc/latex/nameauth/README @@ -16,6 +16,7 @@ Files Distribution README This file nameauth.pdf Documentation +examples.tex Some longer example macros from the documentation Makefile Automates building with GNU make 3.81 nameauth.dtx Documented LaTeX file containing both code and documentation @@ -59,13 +60,13 @@ Normally you create the following manual installation directories for user: $TEXMFHOME/source/latex/nameauth dtx file $TEXMFHOME/tex/latex/nameauth sty file -$TEXMFHOME/doc/latex/nameauth pdf file +$TEXMFHOME/doc/latex/nameauth pdf file, README, examples.tex and you create the following manual installation directories for local site: $TEXMFLOCAL/source/latex/nameauth dtx file $TEXMFLOCAL/tex/latex/nameauth sty file -$TEXMFLOCAL/doc/latex/nameauth pdf file +$TEXMFLOCAL/doc/latex/nameauth pdf file, README, examples.tex The above environment variables often are /usr/local/texlive/texmf-local and ~/texmf. diff --git a/Master/texmf-dist/doc/latex/nameauth/README.txt b/Master/texmf-dist/doc/latex/nameauth/README.txt index 1063131bddd..9729f7af648 100644 --- a/Master/texmf-dist/doc/latex/nameauth/README.txt +++ b/Master/texmf-dist/doc/latex/nameauth/README.txt @@ -16,6 +16,7 @@ Files Distribution README This file nameauth.pdf Documentation +examples.tex Some longer example macros from the documentation Makefile Automates building with GNU make 3.81 nameauth.dtx Documented LaTeX file containing both code and documentation @@ -59,13 +60,13 @@ Normally you create the following manual installation directories for user: $TEXMFHOME/source/latex/nameauth dtx file $TEXMFHOME/tex/latex/nameauth sty file -$TEXMFHOME/doc/latex/nameauth pdf file +$TEXMFHOME/doc/latex/nameauth pdf file, README, examples.tex and you create the following manual installation directories for local site: $TEXMFLOCAL/source/latex/nameauth dtx file $TEXMFLOCAL/tex/latex/nameauth sty file -$TEXMFLOCAL/doc/latex/nameauth pdf file +$TEXMFLOCAL/doc/latex/nameauth pdf file, README, examples.tex The above environment variables often are /usr/local/texlive/texmf-local and ~/texmf. diff --git a/Master/texmf-dist/doc/latex/nameauth/examples.tex b/Master/texmf-dist/doc/latex/nameauth/examples.tex new file mode 100644 index 00000000000..5719834e614 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nameauth/examples.tex @@ -0,0 +1,179 @@ +% This is an example file used with the nameauth package. +% +% +% Below we print the argument both in the text and in a margin paragraph +% unless we are in internal vertical mode. +% +% This macro is suitable to replace \NamesFormat and \FrontNamesFormat. +% +\renewcommand*\NamesFormat[1]% +{% + #1% + \ifinner + \else + \marginpar{\raggedleft\scriptsize #1}% + \fi +} +% +% Below we print the argument in the text and then we query the text tag +% database to see if we can print a text tag after the argument. +% +% This macro is suitable to replace \NamesFormat and \FrontNamesFormat. +% +\newif\ifNoTextTag +\makeatletter +\renewcommand*\NamesFormat[1]% +{% + \let\ex\expandafter% + #1% + \if@nameauth@InName + \ifNoTextTag + \else + \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[% + \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]% + \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]% + \fi + \fi + \if@nameauth@InAKA + \ifNoTextTag + \else + \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo\ex\ex\ex\ex\ex\ex\ex[% + \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex]% + \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}\ex[\the\@nameauth@toksc]% + \fi + \fi + \global\NoTextTagfalse% +} +\makeatother +% +% Below we create a Boolean value \ifSC and set it true. +% +% We then create a macro \DoFormat that prints its argument in +% small caps if a Boolean value is true, or makes no font change +% and prints the the argument of the value is false. +% +% The next macro ignores its argument, sets \SCfalse, then +% uses some control sequences internal to the naming macros to +% parse and print the current name values without any formatting. +% +% The final macro is suitable to replace \MainNameHook and \FrontNameHook. +% +\makeatletter +\newif\ifSC +\SCtrue +\def\DoFormat#1{% + \ifSC + \textsc{#1}% + \else + #1% + \fi +} +\newcommand*\MainNameHook[1]{% + \let\ex\expandafter% + \SCfalse\ignorespaces% + \protected@edef\arga{\ex\trim@spaces\ex{\the\@nameauth@toksa}}% + \protected@edef\argb{\ex\trim@spaces\ex{\the\@nameauth@toksb}}% + \protected@edef\testb{\ex\@nameauth@Root\ex{\the\@nameauth@toksb}}% + \protected@edef\argc{\ex\trim@spaces\ex{\the\@nameauth@toksc}}% + \ifx\argb\testb + \protected@edef\Suff{\@empty}% + \let\Reversed\argb% + \let\SNN\argb% + \let\Short\argb% + \else + \protected@edef\Suff{\ex\@nameauth@Suffix\ex{\the\@nameauth@toksb}}% + \protected@edef\Reversed{\Suff\Space\testb}% + \protected@edef\SNN{\testb\Space\Suff}% + \if@nameauth@RevThis + \let\Short\Suff% + \else + \let\Short\testb% + \fi + \fi + \if@nameauth@InAKA + \ifx\arga\@empty + \ifx\argc\@empty + \if@nameauth@RevThis + \Reversed% + \else + \SNN% + \fi + \else + \if@nameauth@AltAKA + \argc% + \else + \if@nameauth@RevThis + \ex\argc\ex\Space\SNN% + \else + \ex\SNN\ex\space\argc% + \fi + \fi + \fi + \else + \ifx\argc\@empty + \let\FNN\arga% + \else + \let\FNN\argc% + \fi + \if@nameauth@AltAKA + \FNN% + \else + \if@nameauth@RevThis + \ex\SNN\ex\Space\FNN% + \else + \ex\FNN\ex\space\SNN% + \fi + \fi + \fi + \else + \ifx\arga\@empty + \ifx\argc\@empty + \if@nameauth@FullName + \if@nameauth@RevThis + \Reversed% + \else + \SNN% + \fi + \else + \Short% + \fi + \else + \if@nameauth@FullName + \if@nameauth@RevThis + \ex\argc\ex\space\SNN% + \else + \ex\SNN\ex\space\argc% + \fi + \else + \if@nameauth@RevThis + \argc% + \else + \Short% + \fi + \fi + \fi + \else + \ifx\argc\@empty + \let\FNN\arga% + \else + \let\FNN\argc% + \fi + \let\Short\FNN% + \if@nameauth@FullName + \if@nameauth@RevThis + \ex\SNN\ex\Space\FNN% + \else + \ex\FNN\ex\space\SNN% + \fi + \else + \if@nameauth@FirstName + \Short% + \else + \testb% + \fi + \fi + \fi + \fi +} +\makeatother + diff --git a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf Binary files differindex 914d0935b89..f7a04d2b1ff 100644 --- a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf +++ b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf |