diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf | bin | 230084 -> 235585 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx | 66 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/ltxnew/ltxnew.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty | 12 |
4 files changed, 52 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf b/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf Binary files differindex 45fc4b7cafa..c3e74ed0135 100644 --- a/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf +++ b/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf diff --git a/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx b/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx index 3c6390dfc54..44c50ac7132 100644 --- a/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx +++ b/Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % ltxnew : provides the \new \renew and \provide prefixes for checking definitions -% +% [v1.1 2009/10/11] % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any later @@ -36,7 +36,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxnew 2009/07/22 v1.0 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} +\Msg{* Package: ltxnew 2009/10/11 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} \Msg{************************************************************************} \keepsilent @@ -59,7 +59,7 @@ This work consists of the main source file ltxnew.dtx and the derived files ltxnew.sty, ltxnew.pdf, ltxnew.ins, -ltxnew : an easy way to define commands with keys +ltxnew : provides the \string\new \string\renew and \string\provide prefixes for checking definitions Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \endpreamble @@ -100,7 +100,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \usepackage[latin9]{inputenc} \usepackage[american]{babel} \usepackage{etex,holtxdoc,etoolbox,geometry,tocloft,fancyhdr,color,bbding,embedfile,framed,float,multirow,enumitem,txfonts}\CodelineNumbered -\embedfile{ltxnew.dtx} +\embedfile{\thisfile.dtx} \geometry{top=2cm,headheight=1cm,headsep=.3cm,bottom=2cm,left=4cm,right=2cm} \hypersetup{% pdftitle={The ltxnew package}, @@ -108,7 +108,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> pdfauthor={Florent CHERVET}, colorlinks,linkcolor=reflink,urlcolor=refurl, pdfstartview={FitH}, - pdfkeywords={tex, e-tex, latex, package, keys, ltxnew, newcommand, renewcommand, new, renew}, + pdfkeywords={tex, e-tex, latex, package, definitions, macros, ltxnew, newcommand, renewcommand, providecomand, new, renew, provide}, bookmarksopen=true,bookmarksopenlevel=2} \begin{document} \DocInput{\thisfile.dtx} @@ -116,7 +116,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %</driver> % \fi % -% \CheckSum{0} +% \CheckSum{659} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -162,7 +162,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \newcommand\reflinkcolor{\color{reflink}}\definecolor{reflink}{rgb}{0.49,0.00,0.00} % \newcommand\refurlcolor{\color{refurl}}\definecolor{refurl}{rgb}{0.00,0.00,1.00} % \def\ThisPackage{\Xpackage{\thisfile}}\def\thispackage{\xpackage{\thisfile}} -% \fancyhf{}\fancyhead[L]{The \thispackage\ -- \thisinfo} +% \fancyhf{}\fancyhead[L]{\thispackage\ -- \thisinfo} % \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad\copyright\oldstylenums{2009}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet} % \fancyfoot[R]{\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}} % \pagestyle{fancy} @@ -185,8 +185,8 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % % \makeatother % % \title{\mdseries The {\bfseries \Xpackage{ltxnew}}\kern.6em package} -% \author{Florent Chervet \xemail{florent.chervet@free.fr}} -% \date{July 22, 2009} +% \author{\small Florent Chervet \xemail{florent.chervet@free.fr}} +% \date{October 11, 2009} % \subtitle{\thisinfo} % % \maketitle @@ -206,7 +206,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \quad|\new\def\macro| will do {\it something like:} |\newcommand\macro{} \def\macro|§ % \quad|\new\let\macro| will do {\it something like:} |\newcommand\macro{} \let\macro| % -% ...But in fact |\new| does a little more than that... +% ...But in fact |\new| does a little more than that... (see \nameref{Using New}). % % You may use |\new| or |\renew| for declaring macros, counters, dimensions, skips, muskips, % boxes, tokens and \eTeX's marks. Even with |\let|, |\new| can be used. Moreover, |\renew| can be used @@ -311,6 +311,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \end{itemize} % % \subsection{Using \cs{new}} +% \label{Using New} % % |\new| acts as a (expandable) prefix with the following syntax:§ % \DeleteShortVerb{\|}\catcode`\|\active\let|\textbar\def\tvs{\textcolor{green}{\textvisiblespace}}\def\cblue{\color{blue}} @@ -318,7 +319,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % & \cs{new} & \tvs \\ % \cblue possibly & & (\csred{long}\tvs|\csred{global}\tvs|\csred{protected}\tvs|\csred{outer}\tvs) & optional (zero or more) \\ % \cblue in a macro & \multirow{-2}*{\cblue $\Biggl\lbrace$} & \textsc{<definition word>} & required: see below \\ -% & & \textit{control sequence} & required: +% & & \textit{control sequence} & required % \end{tabular}\end{centering}\end{framed} % {\noindent \small \tvs\space denote optional spaces, ignored by the \cs{new}-prefixes-scanner.} % @@ -338,9 +339,11 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % Box & box & savebox & locbox & globbox \cr % Tokens & toksdef & toks & loctoks & globtoks \cr % Fonts & font & & & \cr -% Marks & marks & & locmarks\footnotemark & globmarks \cr \hline\hline +% Marks & marks & & locmarks\footnotemark & globmarks \cr +% Write & & write & & \cr +% Read & & read & & \cr\hline\hline % \end{tabular} -% \caption{List of definition-words that may be used with \CS{new} and \CS{renew}} +% \caption{List of definition-words that may be used with \CS{new} \CS{renew} and \CS{provide}} % \end{table} % \footnotetext{The use of \CS{locmarks} is left to the appreciation of the user...} % @@ -349,8 +352,10 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % |\new\countdef\mycount| & is the same as & |\new\loccount\mycount|\cr % |\new\global\countdef\mycount| & is the same as & |\new\globcount\mycount|\cr % |\new\count\mycount| & is the same as & |\newcount\mycount| \cr -% & & (with control sequence checking) -% \end{tabular}\medskip +% & & (with control sequence checking) \cr +% |\new\write\fileout| & is the same as & |\newwrite\fileout| \cr +% & & (with control sequence checking) \cr +% \end{tabular}\medbreak % % Therefore: (all of the following are global excepting |\newfont|):\par\nobreak % \begin{tabular}{l@{\quad}>{\small}c@{\quad}l@{\quad}>{\small}c@{\quad}l} @@ -375,7 +380,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % % \subsection{Using \cs{renew} and \cs{provide}} % -% \cs{renew} and \cs{provide} have the same syntax as \cs{new}. +% \cs{renew} and \cs{provide} shares the same syntax as \cs{new}. % % \StopEventually{ % } @@ -393,7 +398,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [2005/12/01]% LaTeX must be 2005/12/01 or younger (see kvsetkeys.dtx). \ProvidesPackage{ltxnew} - [2009/07/22 v1.0 provides the new and renew prefixes for checking definitions] + [2009/10/11 v1.1 provides the new and renew prefixes for checking definitions] % \end{macrocode} % \iffalse %<package> @@ -529,14 +534,16 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \else\ifx\x\marks \def\z{\newmarks}%%39 %\newmarks=\globmarks \else\ifx\x\globmarks \def\z{\globmarks}%%40 \else\ifx\x\font \def\z{\font}%%41 - \else\ifx\x\protect \ltxn@error@prefix%%42 + \else\ifx\x\write \def\z{\newwrite}%%42 + \else\ifx\x\read \def\z{\newread}%%43 + \else\ifx\x\protect \ltxn@error@prefix%%44 \else \let\ltxn@next@addto\ltxn@next@prefix \ifx\y\x\ltxn@error@prefix \else\let\y\x \fi \let\next\ltxn@expand@prefix - \fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi @@ -551,7 +558,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \def\ltxn@next@prefix{\futurelet\x\ltxn@@prefix} \def\ltxn@expand@prefix{% \expandafter\futurelet\expandafter\x\expandafter\ltxn@@prefix} -\def\ltxn@addto@prfx#1{\let\y\relax +\def\ltxn@addto@prfx#1{\let\y\@undefined \edef\ltxn@prfx{\ltxn@expandonce{\ltxn@prfx}\ltxn@expandonce{\z}}% \ltxn@next@addto} \expandafter\def\expandafter\ltxn@space@prefix\space{\ltxn@next@prefix} @@ -562,6 +569,8 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> see ltxnew documentation for more information}\@ehd} % \end{macrocode} % +% \subsection{The cancel macros} +% % \begin{macro}{\ltx@cancel} % These are the macros used in case we have to cancel definition (nonstopmode) % \iffalse @@ -576,6 +585,8 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \end{macrocode} % \end{macro} % +% \subsection{The defining macros} +% % \begin{macro}{\ltxn@new} % |\ltxn@new| defines the new control sequence, or cancels definition depending on the result % of |\@ifdefinable|. |\ltxn@new| does all the jobs: it is called by both |\ltxn@renew| and |\ltxn@provide|: @@ -621,10 +632,10 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % (\emph{ie}\, if it is |definable|): % % To handle the case where the control sequence was an outer macro, we ``stringify'' its name first, -% in order not to put the control sequence itself in the definition of next. It's admittedly tricky +% in order not to put the control sequence itself in the definition of |\next|. It's admittedly tricky % here, because if the control sequence is already defined, |\provide| will cancel out the new definition, -% however, as a borderline effect, |\ltxn@new| should have been called if the control sequence cas definable -% with this very control sequence as an argument. Even if this |\iffalse|-call (not expanded) is prepared +% however, as a borderline effect, |\ltxn@new| should have been called with this very control sequence as an argument, +% if it had been definable. Even if this |\iffalse|-call (not expanded) is prepared % into |\ifx|...|\fi| conditional, the |\outer| control sequence is there, and \TeX{} (not \LaTeX{}) % will throw an error: \texttt{Forbidden control sequence found...}. % \iffalse @@ -639,11 +650,12 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \else \ltxn@provide@new \fi \next} -\def\ltxn@provide@new{% +\def\ltxn@provide@new{% \edef\next{\noexpand\ltxn@new\csname\expandafter\@gobble\ltxn@name\endcsname}} % \end{macrocode} % \end{macro} % +% \subsection{The prefixes: \cs{new}, \cs{renew} and \cs{provide}} % % \begin{macro}{\new} % |\new|: the entry point: just let the definition macro to be |\ltxn@new| and start scanning prefixes. @@ -698,6 +710,12 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \end{macrocode} % % \begin{History} +% +% \begin{Version}{2009/10/11 v1.1} +% \item +% Correction of \texttt{.sty} header. +% \end{Version} +% % \begin{Version}{2009/07/22 v1.0} % \item % First version. diff --git a/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins b/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins index 09413730a96..79e369babd0 100644 --- a/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins +++ b/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins @@ -20,13 +20,13 @@ %% and the derived files %% ltxnew.sty, ltxnew.pdf, ltxnew.ins, %% -%% ltxnew : an easy way to define commands with keys +%% ltxnew : provides the \new \renew and \provide prefixes for checking definitions %% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %% \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxnew 2009/07/22 v1.0 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} +\Msg{* Package: ltxnew 2009/10/11 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} \Msg{************************************************************************} \keepsilent @@ -49,7 +49,7 @@ This work consists of the main source file ltxnew.dtx and the derived files ltxnew.sty, ltxnew.pdf, ltxnew.ins, -ltxnew : an easy way to define commands with keys +ltxnew : provides the \string\new \string\renew and \string\provide prefixes for checking definitions Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \endpreamble diff --git a/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty b/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty index d2a8657ed47..e93290b61e1 100644 --- a/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty +++ b/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty @@ -20,14 +20,14 @@ %% and the derived files %% ltxnew.sty, ltxnew.pdf, ltxnew.ins, %% -%% ltxnew : an easy way to define commands with keys +%% ltxnew : provides the \new \renew and \provide prefixes for checking definitions %% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %% \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) [2005/12/01]% LaTeX must be 2005/12/01 or younger (see kvsetkeys.dtx). \ProvidesPackage{ltxnew} - [2009/07/22 v1.0 provides the new and renew prefixes for checking definitions] + [2009/10/11 v1.1 provides the new and renew prefixes for checking definitions] \RequirePackage{etex} @@ -106,14 +106,16 @@ \else\ifx\x\marks \def\z{\newmarks}%%39 %\newmarks=\globmarks \else\ifx\x\globmarks \def\z{\globmarks}%%40 \else\ifx\x\font \def\z{\font}%%41 - \else\ifx\x\protect \ltxn@error@prefix%%42 + \else\ifx\x\write \def\z{\newwrite}%%42 + \else\ifx\x\read \def\z{\newread}%%43 + \else\ifx\x\protect \ltxn@error@prefix%%44 \else \let\ltxn@next@addto\ltxn@next@prefix \ifx\y\x\ltxn@error@prefix \else\let\y\x \fi \let\next\ltxn@expand@prefix - \fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi @@ -124,7 +126,7 @@ \def\ltxn@next@prefix{\futurelet\x\ltxn@@prefix} \def\ltxn@expand@prefix{% \expandafter\futurelet\expandafter\x\expandafter\ltxn@@prefix} -\def\ltxn@addto@prfx#1{\let\y\relax +\def\ltxn@addto@prfx#1{\let\y\@undefined \edef\ltxn@prfx{\ltxn@expandonce{\ltxn@prfx}\ltxn@expandonce{\z}}% \ltxn@next@addto} \expandafter\def\expandafter\ltxn@space@prefix\space{\ltxn@next@prefix} |