summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-23 21:29:07 +0000
committerKarl Berry <karl@freefriends.org>2017-03-23 21:29:07 +0000
commit92c843695cdf50eda50282ddd95705cf0aec67c5 (patch)
tree5ceda1f4e573944c61cd8edf8965f695d0590a5a /Master/texmf-dist/doc/latex
parent10c1a2a82f0cc8edd68925cce34738ffd368bed8 (diff)
nameauth (23mar17)
git-svn-id: svn://tug.org/texlive/trunk@43586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/README2
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/README.txt2
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/examples.tex138
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/nameauth.pdfbin956426 -> 979787 bytes
4 files changed, 116 insertions, 26 deletions
diff --git a/Master/texmf-dist/doc/latex/nameauth/README b/Master/texmf-dist/doc/latex/nameauth/README
index 6a67fe35238..eba2ade9054 100644
--- a/Master/texmf-dist/doc/latex/nameauth/README
+++ b/Master/texmf-dist/doc/latex/nameauth/README
@@ -1,6 +1,6 @@
|
--------:| ----------------------------------------------------------------
-nameauth:| Name authority management for consistency in text and index
+nameauth:| Name authority mechanism for consistency in text and index
Author:| Charles P. Schaum
E-mail:| charles dot schaum at comcast dot net
License:| Released under the LaTeX Project Public License 1.3c or later
diff --git a/Master/texmf-dist/doc/latex/nameauth/README.txt b/Master/texmf-dist/doc/latex/nameauth/README.txt
index 6a67fe35238..eba2ade9054 100644
--- a/Master/texmf-dist/doc/latex/nameauth/README.txt
+++ b/Master/texmf-dist/doc/latex/nameauth/README.txt
@@ -1,6 +1,6 @@
|
--------:| ----------------------------------------------------------------
-nameauth:| Name authority management for consistency in text and index
+nameauth:| Name authority mechanism for consistency in text and index
Author:| Charles P. Schaum
E-mail:| charles dot schaum at comcast dot net
License:| Released under the LaTeX Project Public License 1.3c or later
diff --git a/Master/texmf-dist/doc/latex/nameauth/examples.tex b/Master/texmf-dist/doc/latex/nameauth/examples.tex
index 85c62eb98f1..f7de75f8800 100644
--- a/Master/texmf-dist/doc/latex/nameauth/examples.tex
+++ b/Master/texmf-dist/doc/latex/nameauth/examples.tex
@@ -4,28 +4,59 @@
%% This is an example file used with the nameauth package.
%% See README and nameauth.pdf for copyright info.
%%
-\section*{Test for Latex Engine}
+
+\section{Test for Latex Engine}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Test which LaTeX engine you are using
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{verbatim}
+\ifdefined\Umathchar
+ \usepackage{fontspec}
+ \usepackage{polyglossia}
+\else
+ \usepackage[utf8]{inputenc}
+ \usepackage[TS1,T1]{fontenc}
+ \usepackage{babel}
+\fi
+% Below is optional; use only if your dvi viewer|\\
+% crashes or becomes unresponsive with tikz.|\\
\usepackage{ifxetex}
\usepackage{ifluatex}
-\ifxetex% uses fontspec
- \usepackage{fontspec}% check package docs
- \defaultfontfeatures{Mapping=tex-text}
- \usepackage{xunicode}% check if outmoded
- \usepackage{xltxtra}% check if outmoded
+\usepackage{ifpdf}
+\ifxetex
+ \usepackage{tikz}
\else
- \ifluatex% also uses fontspec
- \usepackage{fontspec}% check package docs
- \defaultfontfeatures{Ligatures=TeX}
- \else% traditional NFSS
- \usepackage[utf8]{inputenc}
- \usepackage[TS1,T1]{fontenc}
+ \ifpdf
+ \usepackage{tikz}
\fi
\fi
\end{verbatim}
+
+\section{Use Different Latex Engines}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Allow for multiple LaTeX engines
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Requires \textsf{ifxetex}, \textsf{ifluatex}, and \textsf{ifpdf}.
+\begin{verbatim}
+\ifxetex
+ xelatex %
+\else
+ \ifluatex
+ \ifpdf
+ lualatex in pdf mode %
+ \else
+ lualatex in dvi mode %
+ \fi
+ \else
+ \ifpdf
+ pdflatex %
+ \else
+ latex %
+ \fi
+ \fi
+\fi
+\end{verbatim}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Print the first use of a name in text and margin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -35,7 +66,7 @@
%%
%% This macro is suitable to replace \NamesFormat and \FrontNamesFormat.
%%
-\section*{First Use in Margin: $\epsilon$-\TeX}
+\section{First Use in Margin: $\epsilon$-\TeX}
\begin{verbatim}
\renewcommand*\NamesFormat[1]%
{%
@@ -45,7 +76,8 @@
\fi
}
\end{verbatim}
-\section*{First Use in Margin: Historic \TeX}
+
+\section{First Use in Margin: Historic \TeX}
\begin{verbatim}
\renewcommand*\NamesFormat[1]%
{%
@@ -55,7 +87,7 @@
\fi
}
\end{verbatim}
-\clearpage
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Print a text tag after first name use
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -65,7 +97,7 @@
%%
%% This macro is suitable to replace \NamesFormat and \FrontNamesFormat.
%%
-\section*{Text Tag With First Use: $\epsilon$-\TeX}
+\section{Text Tag With First Use: $\epsilon$-\TeX}
\begin{verbatim}
\newif\ifNoTag
\makeatletter
@@ -85,7 +117,9 @@
\fi}\temp\global\NoTagfalse}
\makeatother
\end{verbatim}
-\section*{Text Tag With First Use: Historic \TeX}
+\clearpage
+
+\section{Text Tag With First Use: Historic \TeX}
\begin{verbatim}
\newif\ifNoTag
\makeatletter
@@ -109,6 +143,7 @@
\global\NoTagfalse}
\makeatother
\end{verbatim}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Surname index entries in an fbox
%% First surname instances in text are in an fbox
@@ -118,7 +153,7 @@
%% box when \@nameauth@DoAlt is true, or it just prints its argument.
%%
%%
-\section*{Formatting and Capping: New Style}
+\section{Formatting and Capping: New Style}
\begin{verbatim}
\makeatletter
\newcommand*\Fbox[1]{%
@@ -131,6 +166,8 @@
\let\FrontNameHook\MainNameHook
\end{verbatim}
+\clearpage
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Use both the arguments passed to the hooks
%% and \NameParser under different conditions
@@ -141,7 +178,7 @@
%% to make \NameParser print the name differently.
%%
%%
-\section*{Putting \texttt{\textbackslash NameParser} on Display}
+\section{Putting \texttt{\textbackslash NameParser} on Display}
\begin{verbatim}
\makeatletter
\renewcommand*\NamesFormat[1]{%
@@ -163,6 +200,7 @@
\makeatother
\end{verbatim}
\clearpage
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Surname index entries in an fbox
%% First surname instances in text are in an fbox
@@ -175,14 +213,15 @@
%% We then create a macro \Fbox that prints its argument in
%% an fbox when \ifFbox is true, or makes no change otherwise.
%%
-%% The \AltCap macro only capitalizies its argument inside the formatting
-%% hook \NamesFormat below.
+%% The \AltCaps macro only capitalizies its argument inside the
+%% formatting hook \NamesFormat below.
%%
%% \Namesformat ignores its argument, sets \InHooktrue, then
%% calls the name parser used specifically in formatting hooks.
+%% \MainNameHook toggles \Fboxfalse to suppress formatting.
%%
%%
-\section*{Formatting and Capping: Old Style}
+\section{Formatting and Capping: Old Style}
\begin{verbatim}
\newif\ifFbox
\newif\ifFirstCap
@@ -193,9 +232,9 @@
\ifFbox\fbox{#1}\else#1\fi
}
-\renewcommand*\AltCap[1]{%
+\renewcommand*\AltCaps[1]{%
\ifInHook
- \ifFirstCap\uppercase{#1}\else#1\fi
+ \ifFirstCap\MakeUppercase{#1}\else#1\fi
\else
#1%
\fi
@@ -218,4 +257,55 @@
\let\FrontNamesFormat\Namesformat
\let\FrontNameHook\MainNameHook
\end{verbatim}
+\clearpage
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Migrate new style to old style
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% This is the full example abbreviated in the manual.
+%% Below we create a Boolean value \ifCaps and set it true.
+%% This will trigger small caps.
+%%
+%% We then redefine \textSC to use our flag instead of package internals.
+%% We redefine \AltCaps, \CapThis, and \NamesFormat in the same manner
+%% as above. We change \MainNameHook to use our Caps flag.
+%%
+%%
+\section{Migrating New Style to Old Style}
+\begin{verbatim}
+\newif\ifCaps
+\newif\ifFirstCap
+\newif\ifInHook
+\Capstrue
+
+\renewcommand*\textSC[1]{%
+ \ifCaps\textsc{#1}\else#1\fi
+}
+
+\renewcommand*\AltCaps[1]{%
+ \ifInHook
+ \ifFirstCap\MakeUppercase{#1}\else#1\fi
+ \else
+ #1%
+ \fi
+}
+
+\renewcommand\CapThis{\FirstCaptrue}
+
+\renewcommand*\NamesFormat[1]
+{%
+ \InHooktrue\NameParser\InHookfalse%
+ \global\FirstCapfalse%
+}
+
+\renewcommand*\MainNameHook[1]
+{%
+ \Capsfalse\InHooktrue\NameParser\InHookfalse%
+ \global\FirstCapfalse\Capstrue%
+}
+
+\let\FrontNamesFormat\Namesformat
+\let\FrontNameHook\MainNameHook
+\end{verbatim}
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
index 1c29d15eb5f..7a7da3804ec 100644
--- a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
+++ b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
Binary files differ