diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-19 00:41:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-19 00:41:57 +0000 |
commit | 8ace832e879e91b82b2d380cfc322ce9b74b88f2 (patch) | |
tree | ec7e9f6ff8254345257bbdcf57f52aa25437978f /Master | |
parent | bae5d4e052265783b372a10316a6d6e820a6b3dd (diff) |
ltxnew 1.2 (18apr10)
git-svn-id: svn://tug.org/texlive/trunk@17908 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf | bin | 235585 -> 237808 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/ltxnew/ltxnew.dtx | 50 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/ltxnew/ltxnew.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty | 27 |
4 files changed, 47 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf b/Master/texmf-dist/doc/latex/ltxnew/ltxnew.pdf Binary files differindex c3e74ed0135..b0648b5e7bb 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 44c50ac7132..aff891949a7 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] +% [v1.2 2010/04/17] % 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 @@ -22,7 +22,7 @@ % % Documentation: % (pdf)latex ltxnew.dtx -% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +% Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr> %<*ignore> \begingroup \def\x{LaTeX2e}% @@ -36,7 +36,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxnew 2009/10/11 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} +\Msg{* Package: ltxnew 2010/04/17 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} \Msg{************************************************************************} \keepsilent @@ -60,7 +60,7 @@ and the derived files ltxnew.sty, ltxnew.pdf, ltxnew.ins, ltxnew : provides the \string\new \string\renew and \string\provide prefixes for checking definitions -Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr> \endpreamble \let\MetaPrefix\DoubleperCent @@ -96,7 +96,6 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \let\loadclass\LoadClass \def\LoadClass#1{\loadclass[abstracton]{scrartcl}\let\scrmaketitle\maketitle\AtEndOfClass{\let\maketitle\scrmaketitle}} \documentclass[a4paper,oneside]{ltxdoc} -\usepackage{tracing} \usepackage[latin9]{inputenc} \usepackage[american]{babel} \usepackage{etex,holtxdoc,etoolbox,geometry,tocloft,fancyhdr,color,bbding,embedfile,framed,float,multirow,enumitem,txfonts}\CodelineNumbered @@ -116,7 +115,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %</driver> % \fi % -% \CheckSum{659} +% \CheckSum{675} % % \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 @@ -163,7 +162,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \newcommand\refurlcolor{\color{refurl}}\definecolor{refurl}{rgb}{0.00,0.00,1.00} % \def\ThisPackage{\Xpackage{\thisfile}}\def\thispackage{\xpackage{\thisfile}} % \fancyhf{}\fancyhead[L]{\thispackage\ -- \thisinfo} -% \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad\copyright\oldstylenums{2009}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet} +% \fancyfoot[L]{\color[gray]{.35}\scriptsize\thispackage\quad\copyright\oldstylenums{2009}-\oldstylenums{2010}\,\lower.3ex\hbox{\NibRight}\,Florent Chervet} % \fancyfoot[R]{\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}} % \pagestyle{fancy} % \floatplacement{table}{H} @@ -186,7 +185,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % % \title{\mdseries The {\bfseries \Xpackage{ltxnew}}\kern.6em package} % \author{\small Florent Chervet \xemail{florent.chervet@free.fr}} -% \date{October 11, 2009} +% \date{April 17, 2010} % \subtitle{\thisinfo} % % \maketitle @@ -398,7 +397,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/10/11 v1.1 provides the new and renew prefixes for checking definitions] + [2010/04/17 v1.2 provides the new and renew prefixes for checking definitions] % \end{macrocode} % \iffalse %<package> @@ -559,7 +558,10 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \def\ltxn@expand@prefix{% \expandafter\futurelet\expandafter\x\expandafter\ltxn@@prefix} \def\ltxn@addto@prfx#1{\let\y\@undefined - \edef\ltxn@prfx{\ltxn@expandonce{\ltxn@prfx}\ltxn@expandonce{\z}}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\ltxn@prfx + \expandafter\expandafter\expandafter{\expandafter\ltxn@prfx\z}% +% \edef\ltxn@prfx{\ltxn@expandonce\ltxn@prfx\ltxn@expandonce\z}% \ltxn@next@addto} \expandafter\def\expandafter\ltxn@space@prefix\space{\ltxn@next@prefix} \def\ltxn@error@prefix{\@latex@error{A \string\def\space @@ -597,11 +599,12 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \begin{macrocode} \def\ltxn@new#1{% \let\next\ltxn@cancel - \ifdefined#1\unless\ifx#1\relax\def#1{ltxn@throw@error}\fi\fi + \ifdefined#1\unless\ifx#1\relax\def#1{new:error}\fi\fi \expandafter\@ifdefinable\noexpand#1{% \expandafter\let\noexpand#1=\relax - \edef\next{\endgroup\ltxn@expandonce{\ltxn@prfx}\noexpand#1}}% + \edef\next{\endgroup\ltxn@expandonce\ltxn@prfx#1}}% \next} + % \end{macrocode} % \end{macro} % @@ -617,9 +620,9 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \fi % \begin{macrocode} \def\ltxn@renew#1{% - \edef\ltxn@name{\string#1 }% - \ifdefined#1 \ifx#1\relax \ltxn@error{renew: \ltxn@name undefined}\fi - \else \ltxn@error{renew: \ltxn@name undefined}% + \edef\ltxn@name{\string#1}% + \ifdefined#1\ifx#1\relax\ltxn@error{renew: \ltxn@name undefined}\fi + \else \ltxn@error{renew: \ltxn@name undefined}% \fi \let#1=\relax \def\next{\ltxn@new#1}% @@ -646,7 +649,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> \def\ltxn@provide#1{% \let\next\ltxn@cancel \edef\ltxn@name{\string#1}% - \ifdefined#1 \ifx#1\relax \ltxn@provide@new\fi + \ifdefined#1\ifx#1\relax \ltxn@provide@new\fi \else \ltxn@provide@new \fi \next} @@ -665,7 +668,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %<package>% just let the definition macro to be \ltxn@new and start scanning prefixes. % \fi % \begin{macrocode} -\def\new{\let\ltxn@def\ltxn@new\ltxn@prefix} +\protected\def\new{\let\ltxn@def\ltxn@new\ltxn@prefix} % \end{macrocode} % \end{macro} % @@ -677,7 +680,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %<package>% just let the definition macro to be \ltxn@renew and start scanning prefixes. % \fi % \begin{macrocode} -\def\renew{\let\ltxn@def\ltxn@renew\ltxn@prefix} +\protected\def\renew{\let\ltxn@def\ltxn@renew\ltxn@prefix} % \end{macrocode} % \end{macro} % @@ -689,7 +692,7 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> %<package>% just let the definition macro to be |\ltxn@provide| and start scanning prefixes. % \fi % \begin{macrocode} -\def\provide{\let\ltxn@def\ltxn@provide\ltxn@prefix} +\protected\def\provide{\let\ltxn@def\ltxn@provide\ltxn@prefix} % \end{macrocode} % \end{macro} % @@ -710,12 +713,17 @@ Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> % \end{macrocode} % % \begin{History} -% +% +% \begin{Version}{2010/04/17 v1.2} +% \item +% \cs{provide} and \cs{renew} added an undesirable blank space. +% \end{Version} +% % \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 79e369babd0..1fafce06fed 100644 --- a/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins +++ b/Master/texmf-dist/source/latex/ltxnew/ltxnew.ins @@ -21,12 +21,12 @@ %% ltxnew.sty, ltxnew.pdf, ltxnew.ins, %% %% ltxnew : provides the \new \renew and \provide prefixes for checking definitions -%% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +%% Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr> %% \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxnew 2009/10/11 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} +\Msg{* Package: ltxnew 2010/04/17 v1.1 provides the \string\new \string\renew and \string\provide prefixes for checking definitions} \Msg{************************************************************************} \keepsilent @@ -50,7 +50,7 @@ and the derived files ltxnew.sty, ltxnew.pdf, ltxnew.ins, ltxnew : provides the \string\new \string\renew and \string\provide prefixes for checking definitions -Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +Copyright (C) 2009-2010 by Florent Chervet <florent.chervet@free.fr> \endpreamble \let\MetaPrefix\DoubleperCent diff --git a/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty b/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty index e93290b61e1..f56eb46c8f4 100644 --- a/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty +++ b/Master/texmf-dist/tex/latex/ltxnew/ltxnew.sty @@ -21,13 +21,13 @@ %% ltxnew.sty, ltxnew.pdf, ltxnew.ins, %% %% ltxnew : provides the \new \renew and \provide prefixes for checking definitions -%% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +%% Copyright (C) 2009-2010 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/10/11 v1.1 provides the new and renew prefixes for checking definitions] + [2010/04/17 v1.2 provides the new and renew prefixes for checking definitions] \RequirePackage{etex} @@ -127,7 +127,9 @@ \def\ltxn@expand@prefix{% \expandafter\futurelet\expandafter\x\expandafter\ltxn@@prefix} \def\ltxn@addto@prfx#1{\let\y\@undefined - \edef\ltxn@prfx{\ltxn@expandonce{\ltxn@prfx}\ltxn@expandonce{\z}}% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\ltxn@prfx + \expandafter\expandafter\expandafter{\expandafter\ltxn@prfx\z}% \ltxn@next@addto} \expandafter\def\expandafter\ltxn@space@prefix\space{\ltxn@next@prefix} \def\ltxn@error@prefix{\@latex@error{A \string\def\space @@ -145,17 +147,18 @@ % new: Do define or cancel, depending on the result of \@ifdefinable \def\ltxn@new#1{% \let\next\ltxn@cancel - \ifdefined#1\unless\ifx#1\relax\def#1{ltxn@throw@error}\fi\fi + \ifdefined#1\unless\ifx#1\relax\def#1{new:error}\fi\fi \expandafter\@ifdefinable\noexpand#1{% \expandafter\let\noexpand#1=\relax - \edef\next{\endgroup\ltxn@expandonce{\ltxn@prfx}\noexpand#1}}% + \edef\next{\endgroup\ltxn@expandonce\ltxn@prfx#1}}% \next} + % renew: Throws an error in case the control sequence is unknown or \relax \def\ltxn@renew#1{% - \edef\ltxn@name{\string#1 }% - \ifdefined#1 \ifx#1\relax \ltxn@error{renew: \ltxn@name undefined}\fi - \else \ltxn@error{renew: \ltxn@name undefined}% + \edef\ltxn@name{\string#1}% + \ifdefined#1\ifx#1\relax\ltxn@error{renew: \ltxn@name undefined}\fi + \else \ltxn@error{renew: \ltxn@name undefined}% \fi \let#1=\relax \def\next{\ltxn@new#1}% @@ -165,7 +168,7 @@ \def\ltxn@provide#1{% \let\next\ltxn@cancel \edef\ltxn@name{\string#1}% - \ifdefined#1 \ifx#1\relax \ltxn@provide@new\fi + \ifdefined#1\ifx#1\relax \ltxn@provide@new\fi \else \ltxn@provide@new \fi \next} @@ -174,15 +177,15 @@ % \new: the entry point: % just let the definition macro to be \ltxn@new and start scanning prefixes. -\def\new{\let\ltxn@def\ltxn@new\ltxn@prefix} +\protected\def\new{\let\ltxn@def\ltxn@new\ltxn@prefix} % \renew: the entry point: % just let the definition macro to be \ltxn@renew and start scanning prefixes. -\def\renew{\let\ltxn@def\ltxn@renew\ltxn@prefix} +\protected\def\renew{\let\ltxn@def\ltxn@renew\ltxn@prefix} % \provide: the entry point: % just let the definition macro to be |\ltxn@provide| and start scanning prefixes. -\def\provide{\let\ltxn@def\ltxn@provide\ltxn@prefix} +\protected\def\provide{\let\ltxn@def\ltxn@provide\ltxn@prefix} % In case of redefinition, throws an |\ehc|-type error: \def\ltxn@error#1{\@latex@error{#1}\@ehc} |