diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-22 00:51:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-22 00:51:04 +0000 |
commit | ac225c92964fc1f94322e26a4edc729528882bcb (patch) | |
tree | a8da670546bd0acf1141edc0bd0e6b620ce4334a /Master/texmf-dist/tex/generic/dowith/dowith.sty | |
parent | 31cb4a9239c6be1c8e24250668182e12a7bc8b74 (diff) |
dowit (21nov12)
git-svn-id: svn://tug.org/texlive/trunk@28325 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/dowith/dowith.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/dowith/dowith.sty | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/dowith/dowith.sty b/Master/texmf-dist/tex/generic/dowith/dowith.sty index 6f75654b984..a4625aade39 100644 --- a/Master/texmf-dist/tex/generic/dowith/dowith.sty +++ b/Master/texmf-dist/tex/generic/dowith/dowith.sty @@ -1,6 +1,7 @@ \def\filename{dowith} \def\fileinfo{simple list loop (UL)} -\def\filedate{2012/06/04} \def\fileversion{v0.22} -%% Copyright (C) 2011 Uwe Lueck, +\def\filedate{2012/11/05} \def\fileversion{v0.3} +%% +%% Copyright (C) 2011 2012 Uwe Lueck, %% http://www.contact-ednotes.sty.de.vu %% -- author-maintained in the sense of LPPL below -- %% @@ -15,39 +16,30 @@ %% %% http://www.contact-ednotes.sty.de.vu %% -%% % \pagebreak %% 2012/05/19 %% == Proceeding without \LaTeX == -%% A little \LaTeX\ as in Bernd Raichle's %% 2011/11/19 -%% \CtanPkgRef{ngerman}{ngerman.sty}: -%% %% moved 2 lines here 2012/05/14 v0.21: -\chardef\atcode=\catcode`\@ -\catcode`\@=11 % \makeatletter -\begingroup\expandafter\expandafter\expandafter\endgroup -%% I need `\ProvidesPackage' for \ctanpkgref{fileinfo}, -%% my package version tools. -\expandafter\ifx\csname ProvidesPackage\endcsname\relax -%% %% 2011/11/07: -%% When `\ProvidesPackage' is not defined, we provide -%% a version of \LaTeX's `\in@' -%% (an old version that may wrongly -%% claim to have found an occurrence of a sequence, -%% but is correct for single tokens) -%% for checking token list macros. -%% \LaTeX\ must not see `\ifin@' when it parses the -%% `\ifx' conditional: +%% v0.3 mainly replaces imitating the +%% \CtanPkgRef{german}{german.sty} approach to genericity +%% by \ctanpkgref{plainpkg}: +\input plainpkg +\ProvidesPackage{\filename}[\filedate\space + \fileversion\space \fileinfo] +\PushCatMakeLetterAt +%% If \LaTeX\ is not present ... +\ifltx \else +%% ... an old version of its `\in@' is introduced. +%% It is bad as a subword test +%% (false positive cases, cf. \CtanPkgRef{nicetext}{fifinddo} +%% documentation), but 'dowith' will check for single tokens only. +%% If \LaTeX\ \emph{is} present, +%% on the other hand, `\ifin@' is recognized while skipping +%% `false' parts of conditionals, without being matched +%% by some `\fi' before the next `\else', so I hide it by `\csname': \expandafter\newif\csname ifin@\endcsname \def\in@#1#2{% \def\in@@##1#1##2##3\in@@{% \ifx\in@##2\in@false\else\in@true\fi}% \in@@#2#1\in@\in@@} -%% 'readprov' stops reading the file at `\Provides'\texttt{...}, -%% therefore ... - \long\def\@gobble#1{} \expandafter\@gobble -\else - \expandafter\@firstofone \fi -{ \ProvidesPackage{\filename}[\filedate\space - \fileversion\space \fileinfo] } %% %% == Applying a Command == %% 2011/11/07 %% \label{sec:apply} @@ -58,7 +50,8 @@ %% may be either a single token or a group `{<balanced>}'. \def\DoWith#1#2{% \ifx\StopDoing#2\empty -%% The previous `\empty' (replacing `%') is a bug fix as of v0.22, +%% The previous `\empty' (replacing `%') is a bug fix as of v0.22 +%% (June 2012), %% 2012/11/05 %% while in my extension draft I already had it in January 2012. %% It allows ``empty" arglist items \qtd{\lbtok\rbtok}. %% Before v0.22, such an empty brace group would have resulted @@ -134,16 +127,16 @@ %% complains when <list-macro> seems to have been used earlier %% while the second complains when <list-macro> seems \emph{not} to %% have been used before: -\expandafter\ifx\csname @latex@error\endcsname\relax - \def\InitializeListMacro#1{\let#1\empty} %% not \@empty 2011/11/07 - \let\ReInitializeListMacro\InitializeListMacro -\else +\ifltx %% v0.3 \def\InitializeListMacro#1{\@ifdefinable#1{\let#1\empty}} \def\ReInitializeListMacro#1{% \edef\@tempa{\expandafter\@gobble\string#1}% \expandafter\@ifundefined\expandafter{\@tempa}% {\@latex@error{\noexpand#1undefined}\@ehc}% {\let#1\empty}} +\else + \def\InitializeListMacro#1{\let#1\empty} %% not \@empty 2011/11/07 + \let\ReInitializeListMacro\InitializeListMacro \fi %% |\ToListMacroAdd{<list-macro>}{<cmd-or>}| %% appends <cmd-or> to the replacement token list of <list-macro>. @@ -193,7 +186,7 @@ %% %% %% == Leaving and History == -\catcode`\@=\atcode +\PopLetterCatAt %% v0.3 \endinput VERSION HISTORY @@ -207,3 +200,5 @@ v0.21 2012/05/14 fix for "generic" and `typeoutfileinfo': @ before ...! v0.21a 2012/05/19 \labels sec:apply, sec:core; \pagebreak? v0.22 2012/06/04 allow {} items +v0.3 2012/11/05 updating copyright, using `plainpkg', + rewording documentation there |