summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/etextools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-08 23:10:58 +0000
committerKarl Berry <karl@freefriends.org>2010-12-08 23:10:58 +0000
commit3a4601dfbb6823b75e830844636ce2e7ef1a23c0 (patch)
treefbd6becf5a691e5fd1c9a8d17da2e2aca6904070 /Master/texmf-dist/source/latex/etextools
parentdc303a1e6f377dc52672a520237e5898ca5d3b37 (diff)
etextools 3.1415926 (8dec10)
git-svn-id: svn://tug.org/texlive/trunk@20694 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/etextools')
-rw-r--r--Master/texmf-dist/source/latex/etextools/etextools.drv28
-rw-r--r--Master/texmf-dist/source/latex/etextools/etextools.dtx645
-rw-r--r--Master/texmf-dist/source/latex/etextools/etextools.ins3
3 files changed, 405 insertions, 271 deletions
diff --git a/Master/texmf-dist/source/latex/etextools/etextools.drv b/Master/texmf-dist/source/latex/etextools/etextools.drv
index 9df2cae29be..d7b16e30210 100644
--- a/Master/texmf-dist/source/latex/etextools/etextools.drv
+++ b/Master/texmf-dist/source/latex/etextools/etextools.drv
@@ -19,36 +19,40 @@
%% etextools.sty, etextools.pdf, etextools.ins,
%% and etextools-examples.tex
%%
-%%% etextools : e-TeX tools for LaTeX Users and package Writers (v.3.14159 - 2010/04/20)
\edef\thisfile{\jobname}
\def\thisinfo{The \thispackage\ package -- an \eTeX{} package for \LaTeX{}}
-\def\thisrevision{3.14159}
-\def\thisdate{20 April 2010}
-\newcommand\makebookmark[1]{}
+\def\thisrevision{3.1415926}
+\def\thisdate{20 December 2010}
+\PassOptionsToPackage{hyperindex=false,pdfusetitle,colorlinks,pdfpagelabels,pdfencoding=auto}{hyperref}
+\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[a4paper,oneside]{ltxdockit}
\usepackage[latin1]{inputenc}
\usepackage[american]{babel}
-\usepackage{doc,tocloft,stmaryrd,amsmath,amssymb,xspace,graphics,geometry,fancyhdr,titlesec,relsize,framed,bbding,enumitem,embedfile,etoolbox,marvosym,wasysym,soul,makecell,arydshln,numprint}
+\usepackage{bbding}
+\usepackage{doc,tocloft,stmaryrd,amsmath,amssymb,xspace,graphicx,geometry}
+\usepackage{fancyhdr,titlesec,relsize,framed,enumitem,embedfile,xcolor}
+\let\Cross\relax
+\usepackage{interfaces}
+\usepackage{etoolbox,marvosym,wasysym,soul,makecell,colortbl,arydshln,numprint,bookmark}
\CodelineNumbered\CodelineIndex
-\usepackage{fancyvrb,microtype}
-\makeatletter\let\org@newif\newif\def\newif#1{\ifx#1\ifnotempty\else\expandafter\org@newif\fi}
+\usepackage[expansion=all,protrusion=none]{microtype}
+\usepackage{tabu}[2010/12/07]\tracingtabu
+\csname endofdump\endcsname
+\usepackage{fancyvrb}
\usepackage{umrand}
-\let\newif\org@newif
-\makeatother
\newrobustcmd*\cmdLabel[1]{\csgdef{cmdlabel->#1}{}}
\embedfile{\thisfile.dtx}
-\geometry{left=4.5cm,marginparwidth=14pt,right=1.5cm,top=3mm,headsep=3mm,bottom=3mm,footskip=8mm,includeheadfoot}
+\geometry{left=4.5cm,marginparwidth=14pt,right=1.1cm,top=3mm,headsep=3mm,bottom=3mm,footskip=8mm,includeheadfoot}
\csdef{ltd@email}#1{\href{mailto:#1}{\footnotesize\mdseries#1}}
\titlepage{%
title={The \thispackage\footnotemark macros},
subtitle={An \etex package providing useful (purely expandable) tools \\ for LaTeX Users and package Writers},
url={http://www.ctan.org/tex-archive/macros/latex/contrib/etextools/},
- author={\footnotesize Florent CHERVET},
+ author={\FC},
email={florent.chervet@free.fr},
revision={\footnotesize\thisrevision},
date={\footnotesize\thisdate}}
\hypersetup{%
- hyperindex=true,
pdftitle={The etextools package},
pdfsubject={An e-TeX package providing useful tools for LaTeX package writers -- essay on purely expandability},
pdfauthor={Florent CHERVET},
diff --git a/Master/texmf-dist/source/latex/etextools/etextools.dtx b/Master/texmf-dist/source/latex/etextools/etextools.dtx
index 162490638c1..bea51ebc63f 100644
--- a/Master/texmf-dist/source/latex/etextools/etextools.dtx
+++ b/Master/texmf-dist/source/latex/etextools/etextools.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-%%% etextools : e-TeX tools for LaTeX Users and package Writers (v.3.14159 - 2010/04/20)
+% etextools : e-TeX tools for LaTeX Users and package Writers (v.3.1415926 - 2010/12/07)
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -38,7 +38,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: etextools 2010/04/20 v.3.14159 e-TeX tools for LaTeX Users and package Writers *}
+\Msg{* Package: etextools 2010/12/07 v.3.1415926 e-TeX tools for LaTeX Users and package Writers *}
\Msg{************************************************************************}
\keepsilent
@@ -96,34 +96,39 @@ and etextools-examples.tex
%<*driver>
\edef\thisfile{\jobname}
\def\thisinfo{The \thispackage\ package -- an \eTeX{} package for \LaTeX{}}
-\def\thisrevision{3.14159}
-\def\thisdate{20 April 2010}
-\newcommand\makebookmark[1]{}
+\def\thisrevision{3.1415926}
+\def\thisdate{20 December 2010}
+\PassOptionsToPackage{hyperindex=false,pdfusetitle,colorlinks,pdfpagelabels,pdfencoding=auto}{hyperref}
+\PassOptionsToPackage{svgnames}{xcolor}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\documentclass[a4paper,oneside]{ltxdockit}
\usepackage[latin1]{inputenc}
\usepackage[american]{babel}
-\usepackage{doc,tocloft,stmaryrd,amsmath,amssymb,xspace,graphics,geometry,fancyhdr,titlesec,relsize,framed,bbding,enumitem,embedfile,etoolbox,marvosym,wasysym,soul,makecell,arydshln,numprint}
+\usepackage{bbding}
+\usepackage{doc,tocloft,stmaryrd,amsmath,amssymb,xspace,graphicx,geometry}
+\usepackage{fancyhdr,titlesec,relsize,framed,enumitem,embedfile,xcolor}
+\let\Cross\relax
+\usepackage{interfaces}
+\usepackage{etoolbox,marvosym,wasysym,soul,makecell,colortbl,arydshln,numprint,bookmark}
\CodelineNumbered\CodelineIndex
-\usepackage{fancyvrb,microtype}
-\makeatletter\let\org@newif\newif\def\newif#1{\ifx#1\ifnotempty\else\expandafter\org@newif\fi}
+\usepackage[expansion=all,protrusion=none]{microtype}
+\usepackage{tabu}[2010/12/07]\tracingtabu
+\csname endofdump\endcsname
+\usepackage{fancyvrb}
\usepackage{umrand}
-\let\newif\org@newif
-\makeatother
\newrobustcmd*\cmdLabel[1]{\csgdef{cmdlabel->#1}{}}
\embedfile{\thisfile.dtx}
-\geometry{left=4.5cm,marginparwidth=14pt,right=1.5cm,top=3mm,headsep=3mm,bottom=3mm,footskip=8mm,includeheadfoot}
+\geometry{left=4.5cm,marginparwidth=14pt,right=1.1cm,top=3mm,headsep=3mm,bottom=3mm,footskip=8mm,includeheadfoot}
\csdef{ltd@email}#1{\href{mailto:#1}{\footnotesize\mdseries#1}}
\titlepage{%
title={The \thispackage\footnotemark macros},
subtitle={An \etex package providing useful (purely expandable) tools \\ for LaTeX Users and package Writers},
url={http://www.ctan.org/tex-archive/macros/latex/contrib/etextools/},
- author={\footnotesize Florent CHERVET},
+ author={\FC},
email={florent.chervet@free.fr},
revision={\footnotesize\thisrevision},
date={\footnotesize\thisdate}}
\hypersetup{%
- hyperindex=true,
pdftitle={The etextools package},
pdfsubject={An e-TeX package providing useful tools for LaTeX package writers -- essay on purely expandability},
pdfauthor={Florent CHERVET},
@@ -136,7 +141,7 @@ and etextools-examples.tex
%</driver>
% \fi
%
-% \CheckSum{3752}
+% \CheckSum{3781}
%
% \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
@@ -189,16 +194,14 @@ and etextools-examples.tex
% \DoNotIndex{\cslet,\csedef,\csgdef,\blue,\baselineskip,\active,\afterassignment,\apptocmd,\dg,\dgbf,\DefineShortVerb,\DefineVerbatimEnvironment}
% \DoNotIndex{\#,\&,\,\@list@extra,\[,\],\ ,\AtEndOfPackage,\arabic,\ClearPage,\csdef,\csundef,\ifnumcomp,\ifundef,\ifcsdef,\ifcsmacro}
% \DoNotIndex{\ifcsundef,\ifdef,\ifcsparam,\pdfFE,\textvb,\unless,\unexpanded,\undef,\letcs}
-% \hypersetup{hyperindex=true}
%
% \makeatletter
-% \AtEndDocument{\immediate\write\@outlinefile{\let\noexpand\makebookmark\noexpand\@firstofone}}^^A \immediate because there is no more \shipout...
-% \immediate\write\@outlinefile{\noexpand\makeatletter}
-% \newrobustcmd\AddBookMark[1]{\write\@outlinefile{\noexpand\makebookmark{\noexpand\pdfoutline#1}}}
-% ^^A\let\ClearPage\clearpage^^A problem with Verbatim and page break-to be fixed for final print
+% \let\@begintochook \relax \let\@endtochook \relax
+% \newrobustcmd*\Xspace{\ifnum\catcode`\ =10\relax\expandafter\xspace\fi}
+% \newrobustcmd*\FC{{\color{copper}\usefont{T1}{fts}xn FC}}
% \newrobustcmd\ClearPage{\@ifstar{\clearpage}{}}
-% \newrobustcmd\thispackage{\xpackage{\spot\thisfile}\xspace}
-% \newrobustcmd\Thispackage{\Xpackage[\thisfile]{\spot\thisfile}\xspace}
+% \newrobustcmd\thispackage{\xpackage{\spot\thisfile}\Xspace}
+% \newrobustcmd\Thispackage{\Xpackage[\thisfile]{\spot\thisfile}\Xspace}
% \newrobustcmd\xpackage[1]{{\usefont{T1}{lmss}{bx}{n}\db\mbox{#1}}}
% \newcommand\Xpackage{\@dblarg\X@package}
% \protected\def\X@package[#1]#2{\xpackage {#2\footnotemark}\footnotetext {\noindent \xpackage{#2}: \CTAN{macros/latex/contrib/#1}}}
@@ -211,7 +214,7 @@ and etextools-examples.tex
% \catcode`\¤\active\let¤\quad
% \newcommand\smex{\leavevmode\hb@xt@2em{\hfil\spot$\longrightarrow$\hfil}}
% \newcommand*\manfntsymb[1]{\manual\symbol{#1}}
-% \newcommand\dbend{\marginpar{\rmkcolor\manfntsymb{127}}\xspace} \newcommand\manerrarrow{\manfntsymb{121}}
+% \newcommand\dbend{\marginpar{\rmkcolor\manfntsymb{127}}\Xspace} \newcommand\manerrarrow{\manfntsymb{121}}
% \newcommand*\tinybullet[1][3pt]{\kern.4em\raise2pt\hbox{\fontsize{#1}\z@\selectfont\textbullet}\kern.4em}
% \renewcommand\#[1]{{\usefont{T1}{pcr}{bx}{n}\char`\##1}}
% \renewcommand\%{{\vb\char`\%}}
@@ -251,19 +254,29 @@ and etextools-examples.tex
% \newrobustcmd\scs[1]{\expandafter\@gobble\string\\#1}
% \newrobustcmd\md{\mdseries}\newrobustcmd*\mdsm{\mdseries\small}\newrobustcmd*\mdfs{\mdseries\footnotesize}
% \newrobustcmd\prmb[1]{\prm{\bfseries #1}} \newrobustcmd\PRM[2][]{\prm{#1#2}}
-% \newrobustcmd\CH[2][]{`\,\textvb[#1]{#2}\,`\xspace}
+% \newrobustcmd\CH[2][]{`\,\textvb[#1]{#2}\,`\Xspace}
% \newrobustcmd\chcat[3][\blue]{\textvb[#1]{#2}$__{\mathbf{#3}}$}
% \newrobustcmd\stform[2][\red]{{\ttbf#1\if*#2\textasteriskcentered\else#2\fi}}%
% \newrobustcmd\spview[1][\blue]{{\ttbf#1\textvisiblespace}}
% \newrobustcmd\tsptb{\medspace\textbackslash}
% \renewrobustcmd\{{\ifmmode\lbrace\else{\usefont{T1}{cmr}{\f@series}{n}\textbraceleft}\fi}
% \renewrobustcmd\}{\ifmmode\rbrace\else{\usefont{T1}{cmr}{\f@series}{n}\textbraceright}\fi}
-% ^^A\newrobustcmd\mymprm[1]{\mbox{\{\prm{ \ignorespaces#1\ignorespaces\ }\}}}
+% \newrobustcmd*\thisyear{2010}
% \renewrobustcmd\ltxsyntaxlabelfont{\spot\usefont{T1}{pcr}{b}{n}}
% \newrobustcmd\mycolorbox[1][{[rgb]{1.00,1.00,0.79}}]{\@testopt{\my@colorbox[{#1}]}{\red}}
+% \def\M{\@ifstar{\M@i\@firstofone}{\M@i\meta}}
+% \def\M@i#1{\@ifnextchar[^^A]
+% {\M@square#1}
+% {\@ifnextchar(^^A)
+% {\M@paren#1}
+% {\M@brace#1}}^^A
+% }
+% \def\M@square#1[#2]{\M@Bracket[{#1{#2}}]}
+% \def\M@paren#1(#2){\M@Bracket({#1{#2}})}
+% \def\M@brace#1#2{\M@Bracket\{{#1{#2}}\}}
+% \def\M@Bracket#1#2#3{{\ttfamily#1#2#3}}
% \protected\long\def\my@colorbox[#1][#2]#3{\colorbox#1{#2#3}}
-% ^^A\newrobustcmd\mycolorbox[1]{\colorbox[rgb]{1.00,1.00,0.79}{\red #1}}
-% \def\Underbrace#1_#2{$\underbrace{\vtop to2ex{}\hbox{#1}}_{\footnotesize\hbox{#2}}$}
+% \def\Underbrace#1_#2{$\underbrace{\vtop to2ex{}\hbox{#1}}_{\hbox{\footnotesize#2}}$}
% \newrobustcmd*\mydotleader[2][\z@]{\leavevmode\xleaders\hbox to\dimexpr1.7pt+#1{\hss\raise#2\hbox{$\scriptscriptstyle\cdotp$}\hss}}
% \globcount\ettl@AfterGroup
% \newrobustcmd\AfterGroup[1]{\global\advance\ettl@AfterGroup1\relax
@@ -273,14 +286,27 @@ and etextools-examples.tex
% \long\def\avoidvoid[#1]#2{\ifdefvoid{#2}{#1}{#2}}
% \newrobustcmd*\movepage[2][]{\advance\hsize by#2\hoffset\ifblank{#1}{-#2}{#1}\linewidth\the\hsize\textwidth\the\hsize}
% \newrobustcmd\pagenumberdisplay{\leavevmode\lower5pt\hbox{\ttfamily\oldstylenums{\thepage} / \oldstylenums{\pageref{LastPage}}}}
-% \fancypagestyle{corpus}{\fancyhf{}\let\headrulewidth\z@ \footskip=\z@
-% \fancyhead[L]{\deflength\@tempdima{\the\hsize+\the\thesecwidth}\rmkcolor
-% \hskip-\thesecwidth\rlap{\lower6pt\hbox to\@tempdima{\mydotleader\z@\hfill}}\hfill
-% \small The \textcolor{black}{\thispackage}\ macros -- an \eTeX{} package for \LaTeX\hfill}
-% \fancyfoot[L]{\color[gray]{.35}\footnotesize\textcolor{black}{\thispackage\unskip\enspace\copyright}\enspace\scriptsize\lower.3ex\hbox{\NibRight}\enspace Florent Chervet}
-% \fancyfoot[R]{\pagenumberdisplay}}
-% \fancypagestyle{toc}{\fancyhf{}\let\headrulewidth\z@ \fancyfoot[R]{\pagenumberdisplay}}
-% \fancypagestyle{empty}{\fancyhf{}\let\headrulewidth\z@}
+% \footskip=0pt
+% \pagesetup[corpus]{
+% head/rule/width=0pt,
+% head/left=\@tempdima\dimexpr\hsize+\thesecwidth\relax\rmkcolor
+% \hskip-\thesecwidth\rlap{\lower6pt\hbox to\@tempdima{\mydotleader\z@\hfill}}\hfill
+% \small The \textcolor{black}\thispackage\ macros -- and \eTeX{} package for \LaTeX\hfill,
+% foot/left/font=\color[gray]{.35}\footnotesize,
+% foot/left=\vbox to\z@{\vss\rotatebox{90}{\thispackage\unskip\enspace\copyright\,\thisyear\enspace\scriptsize\lower.3ex\hbox{\NibRight}\enspace\FC}},
+% foot/left/offset=4cm,
+% foot/right/offset=.5cm,
+% foot/right=\pagenumberdisplay,
+% }
+% \pagesetup[toc]{
+% head/rule/width=0pt,
+% foot/right=\pagenumberdisplay,
+% }
+% \pagesetup[empty]{norules,
+% foot/left/font=\footnotesize,
+% foot/left=\vbox to\z@{\vss\rotatebox{90}{\thispackage\unskip\enspace\copyright\,\thisyear\enspace\scriptsize\lower.3ex\hbox{\NibRight}\enspace\FC}},
+% foot/left/offset=2cm,
+% }
% ^^A COLORS :
% \let\Org@definecolor\definecolor
% \renewrobustcmd\definecolor[1][]{\ettl@definecolor{#1}}
@@ -321,7 +347,7 @@ and etextools-examples.tex
% \protected@edef\cmdlabel@name{#1}\@onelevel@sanitize\cmdlabel@name
% \xdef\cmdlabel@name{\cmdlabel@name}\endgroup
% \cslet{\detokenize{cmdlabel->}\cmdlabel@name}\@empty
-% \immediate\write\@mainaux{\cmdLabel{\cmdlabel@name}} \hyperdef{cmdlabel}{\cmdlabel@name}{}}
+% \immediate\write\@mainaux{\cmdLabel{\cmdlabel@name}}\hyperdef{cmdlabel}{\cmdlabel@name}{}}
% \newrobustcmd*\cmdref{\let\reflink@color\current@color
% \@ifstar{\@dblarg\cmdrefst}{\@ifchar={\@dblarg\cmdrefeq}{\@dblarg\@cmdref}}}
% \def\cmdrefst[#1]#2{\@cmdref[impl:#1]{#2}}
@@ -329,7 +355,7 @@ and etextools-examples.tex
% \newcommand\cmdrefdisplay[1]{\underline{\mbox{\reflink\vb\textbackslash #1}}}
% \def\@cmdref[#1]#2{\let\cmdref@display\cmdrefdisplay \cmd@hyper[#1]{#2}}
% \protected\def\cmd@hyper[#1]{\@testopt{\cmd@@hyper[{#1}]}{}}
-% \def\cmd@@hyper[#1][#2]#3{\@testopt{\cmd@@@hyper[{#1}][{#2}]{#3}}{\xspace}}
+% \def\cmd@@hyper[#1][#2]#3{\@testopt{\cmd@@@hyper[{#1}][{#2}]{#3}}{\Xspace}}
% \def\cmd@@@hyper[#1][#2]#3[#4]{\ifcsdef{\detokenize{cmdlabel->#1}}%
% {#2\hyperref{}{cmdlabel}{\detokenize{#1}}{\cmdref@display{#3}}#4}%
% {#2\cmdref@display{\colorbox{black}{\color{white}#3}}#4}}%
@@ -383,34 +409,38 @@ and etextools-examples.tex
% \protected@edef\ltd@pdfbookmark{\endgroup\noexpand\Org@ltd@pdfbookmark{#1}{#2}}\ltd@pdfbookmark}
% \def\@ifchar#1#2{\expandafter\@ifnextchar\string#1{\@firstoftwo{#2}}}
% ^^A\let\cmditem\relax
+% ^^A \cmditem - => pas d'entrée dans la liste des commandes / laststarredcmditem et labelize
+% ^^A \cmditem * => idem mais entrée dans la liste des commandes
+% ^^A \cmditem => entrée dans la liste \cmditem + => idem mais couleur \spot dans la liste / lastcmditem et labelize
+% ^^A \cmditem @ => pas d'impression (juste l'entrée dans la liste, avec couleur normale)
+% ^^A \cmditem +[..]@ => pas d'impression (juste l'entrée dans la liste, avec couleur \spot)
% \renewrobustcmd\ltd@cmditem[1][]{\goodbreak
-% \@ifchar-{\my@cmditem@starred[{#1}]\@gobble}
-% {\@ifstar{\my@cmditem@starred[{#1}]\@firstofone}{\my@cmditem[{#1}]}}}
-% \newcommand\my@cmditem@starred[3][]{%
-% \edef\laststarredcmditem{\ifblank{#1}{#3}{#1}}%
-% \edef\cmditem@end@hook{\cmditem@labelize{\ifblank{#1}{#3}{#1}}}%
-% #2{\refstepcounter{command}
-% \expandafter\addcommand\expandafter{\laststarredcmditem}{}{#3}}%
+% \@ifchar-{\my@cmditem@starred{#1}\@gobble}%^^A \cmditem- => pas d'entrée dans la liste des fonctions
+% {\@ifstar{\my@cmditem@starred{#1}\@firstofone}{\my@cmditem{#1}}}}%^^A \cmditem* => entrée dans la liste des fonctions
+% \newrobustcmd*\my@cmditem@starred[3]{%^^A starred = \cmditem- ou \cmditem*
+% \edef\laststarredcmditem{\ifblank{#1}{#3}{#1}}%^^A
+% \edef\cmditem@end@hook{\cmditem@labelize{\ifblank{#1}{#3}{#1}}}%^^A
+% #2{\expandafter\addcommand\expandafter{\laststarredcmditem}{}{#3}}%^^A
% \Org@ltd@cmditem{#3}}^^A Make bookmark anyway (no star form)
-% \newrobustcmd\my@cmditem[1][]{\@ifchar+%
-% {\@ifchar @{\my@cmd@item[{#1}]{\spot}\@gobble}{\my@cmd@item[{#1}]{\spot}\@firstofone}}
-% {\@ifchar @{\my@cmd@item[{#1}]\@firstofone\@gobble}{\my@cmd@item[{#1}]\@firstofone\@firstofone}}}
-% \newrobustcmd\my@cmd@item[4][]{%
+% \newrobustcmd*\my@cmditem[1]{\@ifchar+%^^A \cmditem+ => couleur \spot dans la liste des commandes
+% {\bookmarksetup{color*=spot}^^A
+% \@ifchar @{\my@cmd@item{#1}\spot\@gobble}{\my@cmd@item{#1}\spot\@firstofone}}%^^A \cmditem+@ => couleur \spot (dans la liste) mais pas d'impression dans le texte
+% {\@ifchar @{\my@cmd@item{#1}{}\@gobble}{\my@cmd@item{#1}{}\@firstofone}}}
+% \newrobustcmd*\my@cmd@item[4]{%
% \let\lastcmditem\@empty\let\laststarredcmditem\@empty
% \edef\lastcmditem{\ifblank{#1}{#4}{#1}}%
-% \def\cmditem@end@hook{\cmditem@labelize@display{\avoidvoid[\laststarredcmditem]\lastcmditem}}
-% \refstepcounter{command}
+% \def\cmditem@end@hook{\cmditem@labelize{\avoidvoid[\laststarredcmditem]\lastcmditem}}
% \expandafter\addcommand\expandafter{\lastcmditem}{#2}{#4}%
% #3{\Org@ltd@cmditem{#4}}}
% \newrobustcmd\addcommand[3]{%
-% \addcontentsline{cmd}{command}{\protect\numberline{\cftcommandnum{#1}{#2\arabic{command}}}\cftcommandfont#2{\protect\textbackslash#3}}}
+% \refstepcounter{command}%
+% \addcontentsline{cmds}{command}{\protect\numberline{\cftcommandnum{#1}{#2\arabic{command}}}\cftcommandfont#2{\protect\textbackslash#3}}}
% \newrobustcmd\cftcommandnum[2]{\ifinlist{#1}\listofFEcommands \FEtiny{}\cftcommandfont \mdseries\sffamily\scriptsize\hfill #2\kern.4em}
% \AtEndDocument{\immediate\write\@mainaux{%
% \begingroup\catcode124 3\relax\gdef\noexpand\listofFEcommands{\detokenize\expandafter{\FEcmdlist}}\endgroup}}
% \unless\ifdefined\listofFEcommands\let\listofFEcommands\@empty\fi
% \newrobustcmd\seeimpl@display[1][]{\seeimpl[{#1}]{\avoidvoid[\laststarredcmditem]\lastcmditem}}%
-% \newrobustcmd\cmditem@labelize@display[1]{\cmdlabel{#1}\hfill\par}
-% \newrobustcmd\cmditem@labelize[1]{\cmdlabel{#1}\hfill\par}
+% \newrobustcmd*\cmditem@labelize[1]{\cmdlabel{#1}\hfill\par}
% ^^A At the end of the ltxdockit scanner for \cmditem, the labelize-macro must be expanded:
% \apptocmd\ltd@parseargs@end{\cmditem@end@hook}{}{}
% ^^A Now Macro envir may use the labels:
@@ -431,62 +461,86 @@ and etextools-examples.tex
% \expandafter\@Macro\expandafter{\@backslashchar#2}%
% \ifblank{#1}{\cmdlabel{impl:#2}}{\cmdlabel{impl:#1}}}
% {\end{macro}}
-% \newlistof{command}{cmd}{\listcommandname}\let\listcommandname\@empty
+%
% \DefineVerbatimEnvironment{VerbLines}{Verbatim}{gobble=1,frame=lines,framesep=6pt,fontfamily=txtt,fontseries=b}
% \DefineVerbatimEnvironment{Verb}{Verbatim}{gobble=1}
% \DefineVerbatimEnvironment{VerbZ}{Verbatim}{gobble=1}
-% \cftbeforepartskip=6pt
-% \cftsubsecnumwidth=1.5em
-% \renewcommand\cftsubsecpresnum{\hbox to.5em\bgroup\hss}
-% \renewcommand\cftsubsecaftersnum{\egroup\hbox to1em{\hss\tinybullet\hss}}
-% \renewcommand\cftsubsecpagefont{\scriptsize}
-% \renewrobustcmd\cftsubsecleader{\kern.4em\mydotleader[1pt]\z@\hfill}
-% \cftbeforesubsecskip=-.7pt^^Aplus.01fil
-% \cftbeforesecskip=3pt^^Aplus.01fil
-% \cftsecnumwidth=1.5em
-% \renewrobustcmd\cftsecfont{\usekomafont{section}\large\bfseries\red}
-% \renewcommand\cftpartfont{\usekomafont{section}\large\bfseries}
-% \renewcommand\cftsecpresnum{\cftsecfont\hbox to.5em\bgroup\hss}
-% \renewcommand\cftsecaftersnum{\egroup\raise.2ex\hbox to1em{\hss\scriptsize\Forward\hss}}
-% \cftcommandnumwidth=1.5em
-% \let\cftcommandleader\cftsubsecleader
+% \tocsetup{
+% part/skip=6pt,
+% subsection/number/width=1.5em,
+% subsection/number/before=\hbox to.5em\bgroup\hss,
+% subsection/number/after=\egroup\hbox to1em{\hss\tinybullet\hss},
+% subsection/pagenumbers/font=\scriptsize,
+% subsection/leader=\kern.4em\mydotleader[1pt]\z@\hfill,
+% subsection/skip=-.7pt,
+% section/skip=3pt,
+% section/number/width=1.5em,
+% section/font=\usekomafont{section}\large\bfseries\red,
+% part/font=\usekomafont{section}\large\bfseries,
+% section/number/before=\cftsecfont\hbox to.5em\bgroup\hss,
+% section/number/after=\egroup\raise.2ex\hbox to1em{\hss\scriptsize\Forward\hss},
+% }
+% \newlistof{command}{cmds}{}
% \renewcommand\thecommand{\arabic{command}}
-% \renewrobustcmd\cftcommandfont{\large\sfbf\db}
+% \def\Hy@currentbookmarklevel{\BKM@currentlevel}
% \newlength\thesecwidth\thesecwidth=2.2cm
-% \titleformat\section[hang]{\LARGE\bfseries}
-% {\llap{\hbox to\thesecwidth{\hfil\arabic{section}\hfil\kern.4em{\spot\Forward}\kern.4em\hfil}}}\z@{}
-% \titlespacing\section\z@{6pt plus4pt minus2pt}{3pt plus2pt minus1pt}
-% \newcommand\sectionbreak{\penalty-3000}
-% \newrobustcmd\normalsubsecformat{%
-% \titleformat\subsection[hang]{\Large\bfseries}
-% {\llap{\hbox to\thesecwidth{\arabic{section}\textbullet\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}}}\z@{}%
-% \titlespacing\subsection\z@{6pt plus4pt minus2pt}{3pt plus2pt minus1pt}%
-% \renewcommand\sectionmark[1]{\addcontentsline{cmd}{section}{\protect\numberline{\arabic{section}}##1}}}%
-% \newrobustcmd\implementationsubsecformat{%
-% \titleformat\subsection[hang]{\Large\bfseries}
-% {\llap{\hbox to\thesecwidth{I\textbullet\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}}}\z@{}%
-% \titlespacing\subsection\z@{6pt plus4pt minus2pt}{3pt plus2pt minus1pt}%
-% \titleformat\subsubsection[hang]{\large\bfseries}
-% {\llap{\hbox to\thesecwidth{I\textbullet\arabic{subsection}\textbullet\arabic{subsubsection}\hfil{\fecc--}\hfil}}}\z@{}%
-% }%
-% ^^A\renewcommand\sectionmark[1]{\addcontentsline{cmd}{section}{\protect\numberline{I.\arabic{subsection}}##1}}}
-% \newrobustcmd\firstsubsecformat{%
-% \titleformat\subsection[hang]{\large\bfseries}
-% {\llap{\hbox to\thesecwidth{\hss\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}}}\z@{}
-% \titlespacing\subsection\z@{5pt plus2pt minus2pt}{3pt plus2pt minus1pt}%
-% \let\sectionmark\@gobble
-% }\firstsubsecformat
-% \newcommand\subsectionbreak{\penalty-500}
+%
+% \sectionformat\section[hang]{
+% font=\LARGE\bfseries,
+% label=\llap{\hbox to\thesecwidth{\hfil\arabic{section}\hfil\kern.4em{\spot\Forward}\kern.4em\hfil}},
+% labelsep=0pt,
+% left=0pt,
+% top=6pt plus4pt minus2pt,
+% bottom=3pt plus2pt minus1pt,
+% break=\penalty-3000,
+% bookmark={color=spot},
+% }
+% \newrobustcmd*\normalsubsecformat{\sectionformat\subsection[hang]{
+% font=\Large\bfseries,
+% label=\llap{\hbox to\thesecwidth{\arabic{section}\textbullet\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}},
+% labelsep=0pt,
+% left=0pt,
+% top=6pt plus4pt minus2pt,
+% bottom=3pt plus2pt minus1pt,
+% bookmark={color=ForestGreen,italic},
+% }
+% }
+% \newrobustcmd*\implementationsubsecformat{\sectionformat\subsection[hang]{
+% font=\Large\bfseries,
+% label=\llap{\hbox to\thesecwidth{I\textbullet\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}},
+% labelsep=0pt,
+% left=0pt,
+% top=6pt plus4pt minus2pt,
+% bottom=3pt plus2pt minus1pt,
+% }
+% \sectionformat\subsubsection[hang]{
+% font=\large\bfseries,
+% label=\llap{\hbox to\thesecwidth{I\textbullet\arabic{subsection}\textbullet\arabic{subsubsection}\hfil{\fecc--}\hfil}},
+% labelsep=0pt
+% }
+% }
+% \newrobustcmd*\firstsubsecformat{\sectionformat\subsection[hang]{
+% font=\large\bfseries,
+% label=\llap{\hbox to\thesecwidth{\hss\arabic{subsection}\hfil{\fecc\manerrarrow}\hfil}},
+% labelsep=0pt,
+% left=0pt,
+% top=5pt plus2pt minus2pt,
+% bottom=2pt plus1pt minus1pt,
+% break=\penalty-500,
+% }
+% \sectionformat\section{mark=}
+% }
+% \firstsubsecformat
% \newcommand\Section{\@ifstar{\section*}{\@ifchar.{\@dblarg{\@Section.}}{\@dblarg{\@Section{}}}}}
% \long\def\@Section#1[#2]#3{%
% \ifblank{#1}{}{\let\WriteBookmarks\relax}%
-% \section[{\texorpdfstring{\protect\cftsecfont}{}#2}]{#3}%
-% \ifblank{#1}{}{\let\WriteBookmarks\@empty\numdef\Hy@currentbookmarklevel{\Hy@currentbookmarklevel-1}}}
+% \section[{\texorpdfstring{\protect\cftsecfont}{}#2}]{#3}}%
+% ^^A\ifblank{#1}{}{\let\WriteBookmarks\@empty\numdef\Hy@currentbookmarklevel{\Hy@currentbookmarklevel-1}}}
% \newcommand\Subsection{\@ifstar{\subsection*}{\@ifchar.{\@dblarg{\@Subsection.}}{\@dblarg{\@Subsection{}}}}}
% \long\def\@Subsection#1[#2]#3{%
% \ifblank{#1}{}{\let\WriteBookmarks\relax}%
-% \subsection[{#2}]{#3}%
-% \ifblank{#1}{}{\let\WriteBookmarks\@empty\numdef\Hy@currentbookmarklevel{\Hy@currentbookmarklevel-1}}}
+% \subsection[{#2}]{#3}}%
+% ^^A\ifblank{#1}{}{\let\WriteBookmarks\@empty\numdef\Hy@currentbookmarklevel{\Hy@currentbookmarklevel-1}}}
% \newsavebox\helpbox \newsavebox\helpboxx
% \newcommand\hpbox{\copy\helpbox} \newcommand\hpboxx{\copy\helpboxx}
% \lastlinefit999 \parindent\z@ \topsep\z@ \partopsep\z@ \parskip.3\baselineskip
@@ -494,10 +548,7 @@ and etextools-examples.tex
% \MakeShortVerb{\|}
% \makeatother
%
-% ^^A TITLE PAGE + TABLE OF CONTENTS
-% \begingroup \movepage{2cm}\voffset-1.5\baselineskip \skip\footins=-1.5cm
-% \tocloftpagestyle{toc}
-% \pretocmd\pagenumberdisplay{\vspace*{1cm}}{}{} \enlargethispage{1.5cm}
+% \begingroup \movepage{2cm}\vspace*{-1.2cm}\let\footnoterule\relax\skip\footins=-.3cm\footskip=0pt\enlargethispage\baselineskip
% \definecolor{reflink}{gray}{0}\makeatletter
% \newrobustcmd\corner[2][\spot\umranda]{\hbox{#1\rlap{\char'115}\char'#2}}
% \setbox\helpbox\vbox to\z@{\lineskip-1.3pt\baselineskip\lineskip
@@ -514,21 +565,25 @@ and etextools-examples.tex
% \newsavebox\myb \setbox\myb\vtop to\z@{\hbox{\rlap{\lower1.9ex\hbox{\spot\umranda\char'111}}\lower17.2ex\hbox{\lower1.9ex\hbox{\spot\umranda\char'111}}}\vss}
% \setbox\helpboxx\vbox{\hbox to\z@{\hbox to\hsize{\hfil\copy\helpbox\cleaders\copy\myb\hskip14cm\reflectbox{\copy\helpbox}\hfil}\hss}\printtitlepage}
% \box\helpboxx \footnotetext {\noindent \thispackage: \CTAN{macros/latex/contrib/\thisfile}}
-% ^^A\printtitlepage
-% \AddBookMark{attr{/F 2}goto page 1{/FitH 1000}{etextools}}
%
% \begingroup\makeatletter\parfillskip\z@
-% ^^A\cftsetpnumwidth{0pt}
-% \renewcommand\cfttoctitlefont{\mydotleader{.5ex}\hfill\kern.5em\Large\bfseries}
-% \renewcommand\cftaftertoctitle{\kern.5em\mydotleader{.5ex}\hfill\kern\z@\par\vskip-12pt}
-% \renewcommand\cftpartleader{\kern.4em\mydotleader{.4ex}\hfill\hbox to\z@{\mydotleader{.4ex}\hskip\@pnumwidth\kern\z@\hss}}
-% \cftbeforesubsecskip=-.7ptplus.01fil
-% \cftbeforesecskip=2ptplus.01fil
-% \definecolor{reflink}{rgb}{0.37,0.00,0.37}
-% ^^A\immediate\write18{copy \jobname.tocc \jobname.toc}
-% \vskip-2pt\tableofcontents
-% \vskip-2\parskip\leavevmode\mydotleader{0pt}\hfill\kern0pt\par\vskip-\parskip
-% \endgroup ^^A\the\pagetotal
+% \tocsetup{
+% pagestyle=toc,
+% title=\mydotleader{.5ex}\hfill\kern.5em\Large\bfseries Contents\kern.5em\mydotleader{.5ex}\hfill\kern\z@,
+% title/bottom=-12pt,
+% title/top=12pt,
+% part/leader=\kern.4em\mydotleader{.4ex}\hfill\hbox to\z@{\mydotleader{.4ex}\hskip\@pnumwidth\kern\z@\hss},
+% subsection/skip=-.7ptplus.01fil,
+% section/skip=2ptplus.01fil,
+% after=\vspace*{-6pt}\leavevmode\mydotleader{0pt}\hfill\kern\z@,
+% columns=2,
+% multicolsep=0pt,
+% bookmark={bold,text=etextools,color=black},
+% }
+% \colorlet{reflink}{DarkSlateBlue}^^A\definecolor{reflink}{rgb}{0.37,0.00,0.37}
+% \tableofcontents
+% \endgroup
+% \OnlyDescription
%
% \vskip-6pt\begin{shaded}\parindent0pt\noindent\normalsize\topsep=-\parskip\itemsep=-\parskip
% \let\reflink\reflinkabstract
@@ -566,10 +621,11 @@ and etextools-examples.tex
% The .dtx file is embeded in this pdf thank to \xpackage{embedfile} by H. Oberdiek.\vskip0ptplus1filll}
%
% ^^A END OF FIRST PAGE ----------------------------------------------------------------------------------------------
-% \clearpage
+% \vfil\break
% \endgroup
+%
% ^^A\stop
-% \begingroup \movepage{1cm}
+% \begingroup \movepage{1cm}\footskip=0pt\enlargethispage{\baselineskip}
% \Section*{Introduction}
% \addcontentsline{toc}{section}{\hskip\cftsecnumwidth\texorpdfstring\dr{} Introduction}
% \renewcommand\thesubsection{\arabic{subsection}}^^A for toc
@@ -603,13 +659,14 @@ and etextools-examples.tex
% special sign displayed here in the \textsf{marginpar}. And such macros that requires only two levels
% of expansions are marked with the special sign displayed here\FEII in the \textsf{marginpar}.
%
-% \hfil\begin{tabular}{|>{\rred}c|l|}\hline
-% \thead{levels} & \thead{sequence to get the result} \\ \hline
-% $\mathbf1$ & \cs[\red]{expandnext}|{\def\result}{|\cs[\copper]{FEmacro}\mprm{arguments}|}| \\ \hdashline[1pt/1pt]
-% $\mathbf2$ & \cs[\red]{expandnext}\cs[\red]{expandnext}|{\def\result}{|\cs[\copper]{FEmacro}\mprm{arguments}|}| \\ \hdashline[1pt/1pt]
-% more & \cs[\red]{ExpandNext}|{\def\result}{|\cs[\copper]{FEmacro}\mprm{arguments}|}| \footnotemark \\ \hline
-% \end{tabular}\hfil
-% \footnotetext{\cs{ExpandNext} is not alway enough: \cs{csvloop} for exemple requires \cs{edef} (or \cs{csname}...) to be completely expanded.}.
+% {\centering
+% \begin{tabu}{|>{\rred}X[-1c]|X|} \hline
+% \thead{levels} & \thead{sequence to get the result} \\ \tabucline-
+% $\mathbf1$ & \cs[\red]{expandnext}\M*{\cs{def}\cs{result}}\M*{\cs[\copper]{FEmacro}\mprm{arguments}} \\ \tabucline[on 1pt off1pt]-
+% $\mathbf2$ & \cs[\red]{expandnext}\cs[\red]{expandnext}\M*{\cs{def}\cs{result}}\M*{\cs[\copper]{FEmacro}\mprm{arguments}} \\ \tabucline[on 1pt off1pt]-
+% more & \cs[\red]{ExpandNext}\M*{\cs{def}\cs{result}}\M*{\cs[\copper]{FEmacro}\mprm{arguments}} \footnotemark \\ \tabucline-
+% \end{tabu}\par}
+% \footnotetext{\cs{ExpandNext} is not always enough: \cs{csvloop} for exemple requires \cs{edef} (or \cs{csname}...) to be completely expanded.}
%
% A few\pdfFE macros are only expandable if the |\pdfstrcmp| (or |\strcmp|) primitives are available
% ^^A(this is notably the case of \cmdref{getlistindex}).
@@ -640,30 +697,33 @@ and etextools-examples.tex
% \vfill\clearpage
% \endgroup \normalsubsecformat
%
-% \begingroup\makeatletter \movepage[-2cm]{2.5cm}%
-% ^^A\immediate\write18{copy \jobname.ccmd \jobname.cmd}
-% \def\@begincmdhook{\multicolsep\z@\let\normalcolor\spot\columnseprule.4pt\columnsep=1.5cm\begin{multicols}{2}}
-% \def\@endcmdhook{\AfterGroup{\enlargethispage{2\baselineskip}\mydotleader{-1ex}\hfill\kern\z@}\end{multicols}}
-% \cftsecindent=\glueexpr-\wd\FEtiny@box-.35em
-% \renewrobustcmd\cftsecfont{\sfbf\large\black}
-% \renewcommand\cftcmdtitlefont{\leavevmode\mydotleader{.4ex}\hfill\kern.5em\LARGE\bfseries}
-% \renewcommand\cftaftercmdtitle{\kern.5em\mydotleader{.4ex}\hfill}
-% \renewcommand\listcommandname{\makecellbox[bc]{\thispackage\\[-1ex]List of Commands Provided}}
-% \cftaftercmdtitleskip=6pt
-% \cftbeforesecskip=2pt plus.1fil
-% \cftbeforecommandskip=2pt plus.1fil
-% \tocloftpagestyle{empty}\catcode`\+ 12 \catcode`\! 12
-% \pdfdest name{ListOfCommands} xyz\hyperdef{Part}{ListOfCommands}{}
-% \addtocontents{toc}{\protect\contentsline{part}{\protect\colorbox[rgb]{1.00,1.00,0.79}{\protect\hyperref{}{Part}{ListOfCommands}{\blue List of commands}}}{}{}}
-% \vspace*{-18mm}\listofcommand
-% \AddBookMark{attr{/F 2/C[0 0 1]}goto name{ListOfCommands}{List of commands}}
+% \begingroup\makeatletter \movepage[-2cm]{2.5cm}\enlargethispage{2\baselineskip}
+% \colorlet{reflink}{MidnightBlue}
+% \listofsetup{cmds}{
+% command/number/width=1.5em,
+% command/leader=\cftsubsecleader,
+% command/font=\large\sfbf\db,
+% before=,
+% title/font=\vspace*{-4mm}\LARGE\bfseries,
+% title=\mydotleader{.4ex}\hfill\kern.5em
+% \hyperdef{Part}{ListOfCommands}{\begin{tabu}[b]{c} \thispackage\\[-1ex] List of Commands Provided\end{tabu}}^^A
+% \kern.5em\mydotleader{.4ex}\hfill,
+% title/bottom=12pt,
+% command/skip=4pt plus.1fil,
+% pagestyle=empty,
+% bookmark={bold,color=blue,text=List of commands,level=0},
+% multicols/after=\aftergroup\theleader,
+% twocolumns,
+% }
+% \def\theleader{\vspace*{-3mm}\mydotleader{-.4ex}\hfill\kern0pt}
+% \listofcommand
% \clearpage
% \endgroup
-% ^^A\stop
%
% \part*{{\spot\blacksmiley}\hfill All User Commands\hfill{\spot\blacksmiley}}
%
-% \hypersetup{bookmarksopenlevel=1}
+% \bookmarksetup{openlevel=1}
+%
% \Section{General Helper Macros}
%
% \begin{ltxsyntax}
@@ -925,14 +985,14 @@ and etextools-examples.tex
% \newcommand*\mycell{\small\makecell[c]} \newcommand*\macpf{\vb macro:} \let\theadfont=\nbf
% \hskip-1.5em\begin{tabular}{|>{\vb\cs{}}l|c|c|c|}\hline
% \multicolumn{4}{c}{\textbfbf{to summarize}} \\ \hline
-% \omit&\omit&\omit&\omit \\[.3ex] \cline{2-4}
-% \multicolumn{1}{l|}{} & \thead{macro} & \thead{not macro} & \thead{undefined} \\ \hline
-% meaning & \mycell{the meaning \\ \eg \macpf[\#1]\#2->\#1\#2} & \mycell{the meaning \\ \eg \cs{count21}} & \vb undefined \\
-% meaningcs & \mycell{the meaning \\ \eg \macpf[\#1]\#2->\#1\#2} & \mycell{the meaning \\ \eg \cs{count21}} & \vb undefined \\\hdashline[1pt/1pt]
-% strip@meaning & \mycell{the replacement text \\ \eg \#1\#2} & \mycell{the meaning \\ \eg\cs{count21}} & an empty string \\
-% strip@meaningcs & \mycell{the replacement text \\ \eg \#1\#2} & \mycell{the meaning \\ \eg\cs{count21}} & an empty string \\\hdashline[1pt/1pt]
-% parameters@meaning & \mycell{the parameter string \\ \eg[\#1]\#2} & an empty string & an empty string \\
-% parameters@meaningcs & \mycell{the parameter string \\ \eg[\#1]\#2} & an empty string & an empty string \\ \hline
+% \omit & \omit & \omit & \omit \\ [.3ex] \cline{2-4}
+% \multicolumn{1}{l|}{} & \thead{macro} & \thead{not macro} & \thead{undefined} \\ \hline
+% meaning & \mycell{the meaning \\ \eg \macpf[\#1]\#2->\#1\#2} & \mycell{the meaning \\ \eg \cs{count21}} & \vb undefined \\
+% meaningcs & \mycell{the meaning \\ \eg \macpf[\#1]\#2->\#1\#2} & \mycell{the meaning \\ \eg \cs{count21}} & \vb undefined \\ \hdashline[1pt/1pt]
+% strip@meaning & \mycell{the replacement text \\ \eg \#1\#2} & \mycell{the meaning \\ \eg\cs{count21}} & an empty string \\
+% strip@meaningcs & \mycell{the replacement text \\ \eg \#1\#2} & \mycell{the meaning \\ \eg\cs{count21}} & an empty string \\ \hdashline[1pt/1pt]
+% parameters@meaning & \mycell{the parameter string \\ \eg[\#1]\#2} & an empty string & an empty string \\
+% parameters@meaningcs & \mycell{the parameter string \\ \eg[\#1]\#2} & an empty string & an empty string \\ \hline
% \end{tabular}
% \ClearPage*
%
@@ -1341,14 +1401,15 @@ and etextools-examples.tex
% for example to test \CH{\textasteriskcentered} at the end of a string.
%
% \ClearPage
-% \cmditem{ifstrdigit}{ string }{ true }{ false }
+% \cmditem[ifstrdigit]@{ifstrmatch~\spot\tsptb ifstrnum}
+% \cmditem-{ifstrdigit}{ string }{ true }{ false }
%
% \csbf{ifstrdigit}\FEII expands to \prm{true} if \prm{string} is a single digit.
%
% A \emph{single digit} is $0,1,2,3,4,5,6,7,8$ or $9$ without spaces around, no matter of the category code.
%
% \ClearPage
-% \cmditem+{ifstrnum}{ string }{ true }{ false }
+% \cmditem-{ifstrnum}{ string }{ true }{ false }
%
% \csbf{ifstrnum}\FEII expands to \prm{true} if \prm{string} is a \textbfsf{number in the sense of \eTeX}, that means:
%
@@ -1378,7 +1439,7 @@ and etextools-examples.tex
%
% \ClearPage
% \cmditem+{DeclareStringFilter}[\cs{global}]{ command-name }{ stringA }
-% \newcommand\myitem[1]{\item[\hss{\stform[\rred\large]{#1}}\hss]} \newcommand*\interitem{\item[]\hskip-\leftmargin}
+% \newcommand\myitem[1]{\item[\hss{\stform[\rred\large]{#1}}\hss]} ^^A\newcommand*\interitem{\item[]\hskip-\leftmargin}
%
% With \csbf{DeclareStringFilter}\notFE, you will define \textbf{a purely expandable command} designed to test
% if a string:
@@ -1580,58 +1641,8 @@ and etextools-examples.tex
% \end{ltxsyntax}
%
% \ClearPage*
-% \Section{Define control sequences through groups}
-%
-% \begin{ltxsyntax}
-%
-% \cmditem[AfterGroup]@{AfterGroup\tsptb AfterGroup\stform*}
-% \cmditem-{AfterGroup}{ code }
-% \cmditem-{AfterGroup\stform*}{ code }
-%
-% The \cs[\red]{aftergroup}\notFE\ primitive does not allow arbitrary code: only a single token may be placed after \cs{aftergroup}.
-% \csbf{AfterGroup} allows arbitrary \prm{code} to be expanded after \cs{endgroup} or an end-group character.
%
-% The \stform* star form of \cs{AfterGroup} does the same, but expands its argument with |\edef|:§§
-% \begin{VerbLines}[commandchars=!()]
-%!md \newcommand(!copper\macro)[1]{\textbf{Just to see...!#1}}
-% (!dg\begingroup)
-%!md \newcommand(!copper\othermacro)[1]{\textbf{will we see...!#1}}
-% (!red\AfterGroup)!md{(!copper\macro){if it works}}
-% (!red\AfterGroup*)!md{\expandonce{(!copper\othermacro){if it works}}}
-% (!dg\endgroup)
-% (!nnn and here) (!md(!copper\macro){if it works}) (!nnn will be executed)
-% (!nnn and here) (!md\textbf{will we see...if it works}) (!nnn will be executed)
-% \end{VerbLines}
-%
-% \cmditem{AfterAssignment}{ code }
-%
-% In the same order of idea,\notFE\ \csbf{AfterAssignment} allows arbitrary \prm{code} to be expanded \cs{afterassignment}.
-%
-% \cmditem+{aftergroup@def}{ command }
-%
-% When leaving\notFE\ a group with the end-group character \CH{\stform[\dg]\}} or the execution of \csbf[\dg]{endgroup}
-% the meaning of the control sequences that where locally defined inside the group are restored to
-% what they were before.
-%
-% The idea of \cs{aftergroup@def} is to keep a control sequence though \csbf[\dg]{endgroup} or \CH{\stform[\dg]\}}.
-% This is done by redefining it after the group. \cs{aftergroup@def} is based on \Xpackage[oberdiek/letltxmacro]{letltxmacro} and
-% on \cmdref{AfterGroup} just defined. Therefore, \cs{aftergroup@def} works with commands with optional arguments declared
-% with \LaTeX's \cs{newcommand}, with robust commands from \xpackage{etoolbox}-\cs{newrobustcmd} and
-% with \LaTeX's robust commands (\cs{DeclareRobustCommand}).
-%
-% \begin{VerbLines}[commandchars=!()]
-% { (!dg\newcommand)(!copper\test)[2][default]{ !#1 and !#2 }
-% (!red\aftergroup@def)(!copper\test)
-% }
-% (!copper\test)[option]{mandatory} (!nnn is defined outside the group - but NOT globally)
-% \end{VerbLines}
-%
-%
-% \end{ltxsyntax}
-%
-% \ClearPage*
-%
-% \Section[{Vectorized \texorpdfstring{\cs[\sfbf]{futurelet}}{\cs{futurelet}}}]{Vectorized \csbf{future{\blue let}}: \csbf{future{\spot def}}}
+% \Section[{More options with \texorpdfstring{\cs[\sfbf]{futuredef}}{\cs{futuredef}}}]{More options with \csbf{future{\spot def}} : vectorized \csbf{future{\blue let}}: }
%
% \begin{ltxsyntax}
%
@@ -1653,6 +1664,26 @@ and etextools-examples.tex
%
% {\rmk Unless \cs{@ifstar}, \cs{@ifchar} is a |\long| macro...}
%
+% \cmditem+{@char@testopt}{ code }{ single token }{ default option }{ single token }
+%
+% \csbf{@char@testopt}\notFE is a generalization of \LaTeX's\cs{@testopt} that may be used as follow:§§
+% \begin{VerbLines}[commandchars=!$£]
+% \newcommand$!copper\SpecialMacro£{$!red\@char@testopt£\GeneralMacro({default})}
+% $!nnn with£\GeneralMacro$!nnn a macro accepting optional parenthesis:£
+% \def\GeneralMacro(#1){...}
+% $!nbf or:£
+% \newcommand$!copper\SpecialMacro£{$!red\@char@testopt£\GeneralMacro<{default}>}
+% $!nnn with£\GeneralMacro$!nnn a macro accepting optional brackets:£
+% \def\GeneralMacro<#1>{...}
+% \end{VerbLines}
+%
+% {\rmk NB: \cs{@char@testopt} uses \cmdref{ettl@ifnextchar} and therefore, the category code of single
+% \textbf{characters} is not taken into account.}
+%
+% ^^A \cmditem+{@ifnextchardigit}{ true }{ false }
+% ^^A
+% ^^A \cs{@ifnextchardigit}\notFE\ expands \meta{true} only if the next character is a digit (\ie 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9).
+%
% \cmditem{ettl@ifnextchar}{ single token }{ true }{ false }
%
% \csbf{ettl@ifnextchar}\notFE\ is the engine for \csbf{@ifchar}. It is based on \cs{futurelet} and on the \cmdref={character-test}:§§
@@ -1766,6 +1797,56 @@ and etextools-examples.tex
% {\rmk You may use indifferently \cs{futuredef\stform*\stform=} or \cs{futuredef\stform=\stform*}.}
%
% \ClearPage*
+% \Section{Define control sequences through groups}
+%
+% \begin{ltxsyntax}
+%
+% \cmditem[AfterGroup]@{AfterGroup\tsptb AfterGroup\stform*}
+% \cmditem-{AfterGroup}{ code }
+% \cmditem-{AfterGroup\stform*}{ code }
+%
+% The \cs[\red]{aftergroup}\notFE\ primitive does not allow arbitrary code: only a single token may be placed after \cs{aftergroup}.
+% \csbf{AfterGroup} allows arbitrary \prm{code} to be expanded after \cs{endgroup} or an end-group character.
+%
+% The \stform* star form of \cs{AfterGroup} does the same, but expands its argument with |\edef|:§§
+% \begin{VerbLines}[commandchars=!()]
+%!md \newcommand(!copper\macro)[1]{\textbf{Just to see...!#1}}
+% (!dg\begingroup)
+%!md \newcommand(!copper\othermacro)[1]{\textbf{will we see...!#1}}
+% (!red\AfterGroup)!md{(!copper\macro){if it works}}
+% (!red\AfterGroup*)!md{\expandonce{(!copper\othermacro){if it works}}}
+% (!dg\endgroup)
+% (!nnn and here) (!md(!copper\macro){if it works}) (!nnn will be executed)
+% (!nnn and here) (!md\textbf{will we see...if it works}) (!nnn will be executed)
+% \end{VerbLines}
+%
+% \cmditem{AfterAssignment}{ code }
+%
+% In the same order of idea,\notFE\ \csbf{AfterAssignment} allows arbitrary \prm{code} to be expanded \cs{afterassignment}.
+%
+% \cmditem+{aftergroup@def}{ command }
+%
+% When leaving\notFE\ a group with the end-group character \CH{\stform[\dg]\}} or the execution of \csbf[\dg]{endgroup}
+% the meaning of the control sequences that where locally defined inside the group are restored to
+% what they were before.
+%
+% The idea of \cs{aftergroup@def} is to keep a control sequence though \csbf[\dg]{endgroup} or \CH{\stform[\dg]\}}.
+% This is done by redefining it after the group. \cs{aftergroup@def} is based on \Xpackage[oberdiek/letltxmacro]{letltxmacro} and
+% on \cmdref{AfterGroup} just defined. Therefore, \cs{aftergroup@def} works with commands with optional arguments declared
+% with \LaTeX's \cs{newcommand}, with robust commands from \xpackage{etoolbox}-\cs{newrobustcmd} and
+% with \LaTeX's robust commands (\cs{DeclareRobustCommand}).
+%
+% \begin{VerbLines}[commandchars=!()]
+% { (!dg\newcommand)(!copper\test)[2][default]{ !#1 and !#2 }
+% (!red\aftergroup@def)(!copper\test)
+% }
+% (!copper\test)[option]{mandatory} (!nnn is defined outside the group - but NOT globally)
+% \end{VerbLines}
+%
+%
+% \end{ltxsyntax}
+%
+% \ClearPage*
% \Section{Lists management}
%
% \Subsection{The natural loop}
@@ -2450,7 +2531,7 @@ and etextools-examples.tex
%<*package>
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesPackage{etextools}
- [2010/04/20 v3.14159 e-TeX more useful tools for LaTeX package writers]
+ [2010/12/07 v3.1415926 e-TeX more useful tools for LaTeX package writers]
\csname ettl@onlyonce\endcsname\let\ettl@onlyonce\endinput
% \end{macrocode}
%
@@ -2549,7 +2630,7 @@ and etextools-examples.tex
% \cs{ettl@char} expands to \prm{true} if its argument is a single character token. It is used in
% \cmdref*{ettl@ifnextchar}.
% \begin{macrocode}
-\long\def\ettl@char#1{\csname ettl@\if @\expandafter\ettl@cdr\detokenize{#1}\@nil @%
+\long\def\ettl@char#1{\csname ettl@\ifcat $\expandafter\ettl@cdr\detokenize{#1}\@nil$%
1\else2\fi of2\endcsname}
% \end{macrocode}
%\end{macro}
@@ -2613,7 +2694,7 @@ and etextools-examples.tex
% \cs{ettl@ney}\FEII is exactly |\ifnotempty| but with the syntax of |\ettl@nbk|: it may be used in place of |\ettl@nbk|:
% \begin{macrocode}
\long\def\ettl@ney#1//#2#3//{\romannumeral 0\csname @%
- \if @\detokenize{#1}@first\else second\fi oftwo\endcsname
+ \ifcat $\detokenize{#1}$first\else second\fi oftwo\endcsname
{ #2}{ #3}}
% \end{macrocode}
%\end{macro}
@@ -2831,7 +2912,7 @@ and etextools-examples.tex
% \begin{Macro}{noexpandcs}
% {\rmk|\noexpandcs| may be abbreviated f.ex. in |\`#1`| or |\"#1"| in |\edef| that take place in a group.}
% \begin{macrocode}
-\newcommand*\noexpandcs[1]{\expandafter\noexpand\csname #1\endcsname}
+\providecommand*\noexpandcs[1]{\expandafter\noexpand\csname #1\endcsname}
% \end{macrocode}
% \end{Macro}
%
@@ -2857,7 +2938,7 @@ and etextools-examples.tex
%
%\begin{Macro}{thefontname}
% \begin{macrocode}
-\newcommand\thefontname{{\expandafter\expandafter\expandafter\ettl@thefontname
+\newcommand\thefontname{\nfss@text{\expandafter\expandafter\expandafter\ettl@thefontname
\expandafter\expandafter\expandafter\meaning
\expandafter\the\expandafter\font
\expandafter\string\expandafter(%
@@ -3099,8 +3180,8 @@ and etextools-examples.tex
% \cs{ifsingletoken} is a safe \cs{ifx}-test:
% \begin{macrocode}
\newcommand\ifsingletoken[2]{\romannumeral\csname rmn@\ettl@firstspace{#2}
- {\ettl@nbk#1#2//{second}{\if @\detokenize{#1#2}@first\else\ifx#1#2first\else second\fi\fi}//}
- {\if @\detokenize\expandafter{\ettl@cdr#2\@nil}@%
+ {\ettl@nbk#1#2//{second}{\ifcat $\detokenize{#1#2}$first\else\ifx#1#2first\else second\fi\fi}//}
+ {\ifcat $\detokenize\expandafter{\ettl@cdr#2\@nil}$%
\expandafter\ettl@ifxsingle
\else\expandafter\ettl@carcar
\fi{#1}{#2}{first}{second}}%
@@ -3120,12 +3201,12 @@ and etextools-examples.tex
\ettl@nbk#2//%
{\ettl@nbk#1//%
{\expandnexttwo\ettl@ifx{\ettl@car#2\@nil}{\ettl@car#1\@nil}{first}{second}}
- {\if @\detokenize{#1}@secondoftwo\ettl@csname\fi
+ {\ifcat $\detokenize{#1}$secondoftwo\ettl@csname\fi
\ettl@firstspace{#2}{first}{second}}//}%
{\ettl@nbk#1//%
- {\if @\detokenize{#2}@secondoftwo\ettl@csname\fi
+ {\ifcat $\detokenize{#2}$secondoftwo\ettl@csname\fi
\ettl@firstspace{#1}{first}{second}}
- {\if @\detokenize{#1#2}@first\else second\fi}}//%
+ {\ifcat $\detokenize{#1#2}$first\else second\fi}}//%
oftwo\endcsname}
% \end{macrocode}
%\end{Macro}
@@ -3139,8 +3220,8 @@ and etextools-examples.tex
% \cs{ifOneToken} test if its argument contains only one token (possibly a space token):
% \begin{macrocode}
\newcommand\ifOneToken[1]{\romannumeral\csname rmn@\ettl@firstspace{#1}
- {\ettl@nbk#1//{second}{\if @\detokenize{#1}@second\else first\fi}//}
- {\if @\detokenize\expandafter{\ettl@cdr#1\@nil}@%
+ {\ettl@nbk#1//{second}{\ifcat $\detokenize{#1}$second\else first\fi}//}
+ {\ifcat $\detokenize\expandafter{\ettl@cdr#1\@nil}$%
first\else second\fi}oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3154,8 +3235,8 @@ and etextools-examples.tex
% Test if \#2 is a single character equal to \#1:
% \begin{macrocode}
\long\def\ifsinglechar#1#2{\romannumeral\csname rmn@\ettl@firstspace{#2}
- {\ettl@nbk#2//{second}{\if @\detokenize{#1#2}@first\else\ifx#1#2first\else second\fi\fi}//}
- {\if @\detokenize\expandafter{\ettl@cdr#2\@nil}@%
+ {\ettl@nbk#2//{second}{\ifcat $\detokenize{#1#2}$first\else\ifx#1#2first\else second\fi\fi}//}
+ {\ifcat $\detokenize\expandafter{\ettl@cdr#2\@nil}$%
\expandafter\ettl@ifchar
\else\expandafter\ettl@carcar
\fi{#1}{#2}{first}{second}}%
@@ -3177,8 +3258,8 @@ and etextools-examples.tex
oftwo\endcsname}
\else
\newcommand\ifOneChar[1]{\romannumeral\csname rmn@\ettl@firstspace{#1}
- {\ettl@nbk#1//{second}{\if @\detokenize{#1}@second\else first\fi}//}
- {\if @\expandafter\ettl@cdr\detokenize{#1}\@nil @%
+ {\ettl@nbk#1//{second}{\ifcat $\detokenize{#1}$second\else first\fi}//}
+ {\ifcat $\expandafter\ettl@cdr\detokenize{#1}\@nil$%
first\else second\fi}oftwo\endcsname}
\fi%\pdfmatch
% \end{macrocode}
@@ -3216,12 +3297,12 @@ and etextools-examples.tex
\ettl@nbk#2//%
{\ettl@nbk#1//%
{\expandnexttwo\ettl@ifchar{\ettl@car#2\@nil}{\ettl@car#1\@nil}{first}{second}}
- {\if @\detokenize{#1}@secondoftwo\ettl@csname\fi
+ {\ifcat $\detokenize{#1}$secondoftwo\ettl@csname\fi
\ettl@firstspace{#2}{first}{second}}//}%
{\ettl@nbk#1//%
- {\if @\detokenize{#2}@secondoftwo\ettl@csname\fi
+ {\ifcat $\detokenize{#2}$secondoftwo\ettl@csname\fi
\ettl@firstspace{#1}{first}{second}}
- {\if @\detokenize{#1#2}@first\else second\fi}}//%
+ {\ifcat $\detokenize{#1#2}$first\else second\fi}}//%
oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3235,8 +3316,8 @@ and etextools-examples.tex
% \cs{ifiscs}\prm{string} expands \prm{true} only if \prm{string} is a single control-word:
% \begin{macrocode}
\newcommand\ifiscs[1]{\romannumeral\csname rmn@\ettl@nbk#1//%
- {\if @\expandafter\ettl@cdr\detokenize{#1}\@nil @secondoftwo\ettl@csname\fi
- \if @\detokenize\expandafter{\ettl@cdr#1\@nil}@%
+ {\ifcat $\expandafter\ettl@cdr\detokenize{#1}\@nil$secondoftwo\ettl@csname\fi
+ \ifcat $\detokenize\expandafter{\ettl@cdr#1\@nil}$%
\expandafter\ettl@firstspace
\else secondoftwo\ettl@csname\fi{#1}{second}{first}}
{second}//oftwo\endcsname}
@@ -3284,7 +3365,7 @@ and etextools-examples.tex
% \begin{Macro}{ifempty}
% |\ifempty| is based on |\detokenize| and can manage with any argument.
% \begin{macrocode}
-\newcommand\ifempty[1]{\romannumeral\csname rmn@\if @\detokenize{#1}@%
+\newcommand\ifempty[1]{\romannumeral\csname rmn@\ifcat $\detokenize{#1}$%
first\else second\fi oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3297,7 +3378,7 @@ and etextools-examples.tex
% \begin{Macro}{ifnotempty}
% |\ifnotempty| is based on |\detokenize| and can manage with any argument.
% \begin{macrocode}
-\newcommand\ifnotempty[1]{\romannumeral\csname rmn@\if @\detokenize{#1}@%
+\newcommand\ifnotempty[1]{\romannumeral\csname rmn@\ifcat $\detokenize{#1}$%
second\else first\fi oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3674,7 +3755,7 @@ and etextools-examples.tex
% \begin{macrocode}
\long\def\ettl@BasicFilter#1#2#3/End§String/{\expandafter\ettl@B@sicFilter #1#3//#2/End§String//End§String/}
\long\def\ettl@B@sicFilter#1/#2//#3/End§String/{@\ettl@nbk#3//%
- {\if @\detokenize{#1#2}@first\else second\fi}
+ {\ifcat $\detokenize{#1#2}$first\else second\fi}
{second}//oftwo}
% \end{macrocode}
%\end{macro}
@@ -3685,7 +3766,7 @@ and etextools-examples.tex
\newcommand\FE@testopt[3]{\ettl@FE@testopt#1/[/%
{#2#1}%
{#2[{#3}]{#1}}}%]
-\long\def\ettl@FE@testopt#1[#2/#3#{\csname @\if @\detokenize{#1#2}@%
+\long\def\ettl@FE@testopt#1[#2/#3#{\csname @\ifcat $\detokenize{#1#2}$%
first\else second\fi oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3700,7 +3781,7 @@ and etextools-examples.tex
\newcommand\FE@ifstar[3]{\ettl@FE@ifstar#1/*/%
{#2}%
{#3{#1}}}
-\long\def\ettl@FE@ifstar#1*#2/#3#{\csname @\if @\detokenize{#1#2}@%
+\long\def\ettl@FE@ifstar#1*#2/#3#{\csname @\ifcat $\detokenize{#1#2}$%
first\else second\fi oftwo\endcsname}
% \end{macrocode}
% \end{Macro}
@@ -3716,7 +3797,7 @@ and etextools-examples.tex
\newcommand\FE@ifcharequal[3]{\ettl@FE@charequal#1/=/%
{#2}%
{#3{#1}}}
-\long\def\ettl@FE@charequal#1=#2/#3#{\csname @\if @\detokenize{#1#2}@%
+\long\def\ettl@FE@charequal#1=#2/#3#{\csname @\ifcat $\detokenize{#1#2}$%
first\else second\fi oftwo\endcsname}
% \end{macrocode}
%\end{macro}
@@ -3731,7 +3812,7 @@ and etextools-examples.tex
% as |\FE@ifchar.|
% \begin{macrocode}
\newcommand\ettl@ifchardot[1]{\ettl@FE@chardot#1/./}
-\long\def\ettl@FE@chardot#1.#2/#3#{\csname @\if @\detokenize{#1#2}@%
+\long\def\ettl@FE@chardot#1.#2/#3#{\csname @\ifcat $\detokenize{#1#2}$%
first\else second\fi oftwo\endcsname}
% \end{macrocode}
%\end{macro}%
@@ -3861,15 +3942,20 @@ and etextools-examples.tex
% arguments and with the ones defined using \LaTeX's \cs{DeclareRobustCommand}.
% {\rmk: we could have used the \cmdref*{AfterGroup} macro but execution is lighter with $5$ calls to \cs{aftergroup} primitive.}:§§
% \begin{macrocode}
-\newrobustcmd\aftergroup@def[1]{%
+\newrobustcmd*\aftergroup@def{\@ifstar\aftergroup@defstar\aftergroup@d@f}
+\newrobustcmd*\@ftergroup@def[3]{%
+ \aftergroup#2\aftergroup#3\aftergroup#1%
+ \aftergroup\global \aftergroup\undef \aftergroup#1}
+\newrobustcmd*\aftergroup@defstar[1]{%
+ \global\expandafter\let\csname ettl@ftergroup@def\the\numexpr\ettl@fter+1\endcsname#1%
+ \global\advance\ettl@fter\@ne
+ \expandafter\@ftergroup@def\csname ettl@ftergroup@def\the\ettl@fter\endcsname\let#1}
+\newrobustcmd*\aftergroup@d@f[1]{%
\let\etex@let@primitive\let \def\let{\global\etex@let@primitive}%
- \expandafter\LetLtxMacro\csname ettl@ftergroup@def\number\numexpr\the\ettl@fter+1\endcsname#1%
+ \expandafter\LetLtxMacro\csname ettl@ftergroup@def\the\numexpr\ettl@fter+1\endcsname#1%
\global\advance\ettl@fter\@ne
\etex@let@primitive\let=\etex@let@primitive
- \aftergroup\LetLtxMacro \aftergroup#1%
- \expandafter\aftergroup\csname ettl@ftergroup@def\the\ettl@fter\endcsname
- \aftergroup\global \aftergroup\undef
- \expandafter\aftergroup\csname ettl@ftergroup@def\the\ettl@fter\endcsname}
+ \expandafter\@ftergroup@def\csname ettl@ftergroup@def\the\ettl@fter\endcsname\LetLtxMacro#1}%
\let\ettl@aftergroup@def\aftergroup@def
% \end{macrocode}
% \end{Macro}
@@ -3892,6 +3978,36 @@ and etextools-examples.tex
%
% \iffalse
%<package>
+%<package>%% \@char@testopt{ code }{ single token }{ default value }{ single token }
+%<package>
+% \fi
+%
+% \begin{Macro}{@char@testopt}
+% \cs{@char@testopt} is a generalisation of \cs{@testopt} for other pairs of character than \string[ and \string]
+% to pass optional parameters to macros. It is based on \cmdref{ettl@ifnextchar} and therefore on the \cmdref={character-test}.
+% \begin{macrocode}
+\newcommand\@char@testopt[4]{\ettl@ifnextchar#2{#1}{#1#2#3#4}}
+% \end{macrocode}
+% \end{Macro}
+%
+% \iffalse
+%<package>
+%<package>%% \@ifnextchardigit{ true }{ false }
+%<package>
+% \fi
+% \iffalse
+% \begin{Macro}{@ifnextchardigit}
+% \begin{macrocode}
+\newrobustcmd\@ifnextchardigit[2]{\begingroup
+
+ \endgroup
+}% \@ifnextchardigit
+% \end{macrocode}
+% \end{Macro}
+% \fi
+%
+% \iffalse
+%<package>
%<package>%% \ettl@ifnextchar{ character token }{ true }{ false }
%<package>
% \fi
@@ -3904,10 +4020,10 @@ and etextools-examples.tex
% the macro parameter is |\else|, |\if| or |\fi|...):
% \begin{macrocode}
\newrobustcmd\ettl@ifnextchar[3]{\begingroup
- \edef\1##1/##2/##3{##1\endgroup\unexpanded{#2}##3}%
- \edef\2##1/##2/##3{##1\endgroup\unexpanded{#3}##3}%
+ \long\edef\1##1/##2/##3{##1\endgroup\unexpanded{#2}##3}%
+ \long\edef\2##1/##2/##3{##1\endgroup\unexpanded{#3}##3}%
\ifOneToken{#1}
- {\csname ettl@\if @\expandafter\ettl@cdr\detokenize{#1}\@nil @% OneChar
+ {\csname ettl@\ifcat $\expandafter\ettl@cdr\detokenize{#1}\@nil$% OneChar
xifnch\else xifntk\fi\endcsname{#1}}
{\2//{}}}
% \end{macrocode}
@@ -3923,8 +4039,8 @@ and etextools-examples.tex
\else \def\ettl@xifnch{%
\ifx\@let@token\bgroup \2
\else\ifx\@let@token\egroup \2
- \else\ifx\@let@token\@sptoken \ettl@ifnspace\ettl@xifnch%
- \else\ettl@ifnch%
+ \else\ifx\@let@token\@sptoken \ettl@ifnspace\ettl@xifnch
+ \else\ettl@ifnch
\fi\fi\fi/{#1}/{}}%
\fi\futurelet\@let@token\ettl@xifnch}
% \end{macrocode}
@@ -3991,7 +4107,7 @@ and etextools-examples.tex
{\@ifchar={\ettl@futdef#1\unexpanded}
{\@testopt{\ettl@futur@def#1#2}{}}}}
\long\def\ettl@futur@def#1#2[#3]{%
- \csname ettl@\if @\detokenize{#3}@1\else2\fi of2\endcsname
+ \csname ettl@\ifcat $\detokenize{#3}$1\else2\fi of2\endcsname
{\let \ettl@x \@empty \letcs \ettl@futur@def@collect{\@gobblescape#1@collectall}}%
{\def \ettl@x {#3}\edef \ettl@y {#2{#3}}%
\ifx\ettl@x\ettl@y \let\ettl@y\@gobble
@@ -4281,7 +4397,7 @@ and etextools-examples.tex
\def\ettl@set@result#1of#2>#3<#4{\ifdefcount{#3}
{#3=\csname ettl@#1of#2\endcsname#4}
{\expandafter\edef\noexpand#3{\csname ettl@#1of#2\endcsname{#4}}}%
-}
+}
% \end{macrocode}
% \end{Macro}
% \end{Macro*}
@@ -4336,10 +4452,10 @@ and etextools-examples.tex
\fi{##4#3//}{\ettl@breakloop{\ifx##10\expandafter\relax\fi}}%
}{\ettl@breakloop{}}///End§List/}}%
#1\long\def#5##1##2#3##3##4/##5##6##7/End§List/{%
- \if @\detokenize{##2}@\expandafter\@gobbletwo\fi\@firstofone{##1{##2}}%
+ \ifcat $\detokenize{##2}$\expandafter\@gobbletwo\fi\@firstofone{##1{##2}}%
##6{##1}##3##4//{##6}{##7}/End§List/}
#1\long\def#6##1##2##3#3##4##5/##6##7##8/End§List/{%
- \if @\detokenize{##3}@\expandafter\@gobbletwo\fi\@firstofone{##2[##1]{##3}}%
+ \ifcat $\detokenize{##3}$\expandafter\@gobbletwo\fi\@firstofone{##2[##1]{##3}}%
\expandafter##7\expandafter{\number\numexpr##1+1}{##2}##4##5//{##7}{##8}/End§List/}
#1\protected\def#7{\@ifchar*%
{\@ifchar+{\ettl@forloop{\expandafter#2\expandafter*\expandafter+}{[####1]####2}}
@@ -4398,9 +4514,10 @@ and etextools-examples.tex
#1\expandafter[\csname ettl@for@do\the\ettl@for@nested\endcsname]{#3}%
\csundef{ettl@for@do\the\ettl@for@nested}%
\csundef{ettl@for@loop\the\ettl@for@nested}%
- \global\advance\ettl@for@nested\m@ne\relax}
+ \global\advance\ettl@for@nested\m@ne\relax}%
\expandafter\afterassignment\csname ettl@for@loop\the\ettl@for@nested\endcsname
- \long\csdef{ettl@for@do\the\ettl@for@nested}#2}
+ \long\csdef{ettl@for@do\the\ettl@for@nested}#2%
+}% \ettl@for@nested
% \end{macrocode}
%\end{macro}
%
@@ -4678,12 +4795,12 @@ and etextools-examples.tex
% \begin{macrocode}
\newrobustcmd\ettl@getlistindex[6]{% #1=result, #2=\expandafter, #3=loop macro, #4=separator, #5=list of list macro, #6=item
\begingroup\long\def\ettl@getlistindex##1#4#6#4##2/End§List/{\endgroup
- \ExpandAftercmds{\ettl@setresult 1of1>#1<}{\ettl@nbk##2//{#3*!{##1}}{-1}//}%
+ \ExpandAftercmds{\ettl@setresult 1of1>#1<}{\ettl@nbk##2//{#3*!{##1}}{-1}//}%
}#2\ettl@getlistindex#5#4#6#4/End§List/}
\newrobustcmd\getlistindex{\@ifstar
{\@testopt{\ettl@get@listindex\relax}{}}
{\@testopt{\ettl@get@listindex\expandafter}{}}}
-\begingroup\catcode`\|=3% etb catcode
+\begingroup\catcode`\|=3% etb catcode
\protected\long\gdef\ettl@get@listindex#1[#2]#3#4{%
\ifx#1\relax
\ettl@getlistindex{#2}{}\listloop|{#4}{#3}%
@@ -4831,12 +4948,19 @@ and etextools-examples.tex
% \begin{macrocode}
%</package>
% \end{macrocode}
-%
-% \section{Examples}
+%
+% \Section*{Examples} \refstepcounter{section}
% \label{sec:examples}
+% ^^A\addcontentsline{toc}{section}{\texorpdfstring\dr{}\hskip\dimexpr\cftsecnumwidth-4pt Implementation}^^A do not add to .cmd file
+% \addcontentsline{toc}{section}{\protect\numberline{II}\cftsecfont Examples}^^A do not add to .cmd file
+% \addtocontents{toc}{\cftbeforesubsecskip=-2pt plus\gluestretch\cftbeforesubsecskip\relax}
+% ^^A\renewrobustcmd\noexpand\cftsubsecfont{\footnotesize}}\renewcommand\thesubsection{I.\arabic{subsection}}^^A for toc
+%
+% This is the code of \sty{etextools-example.tex} which comes with the package.
%
% \begin{macrocode}
%<*example>
+\ProvidesFile{etextools-examples}
\documentclass[11pt,french,a4paper,oneside]{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
@@ -4850,7 +4974,7 @@ and etextools-examples.tex
\let\org@newif\newif
\def\newif#1{\ifx#1\ifnotempty\else\expandafter\org@newif\fi}
\usepackage{umrand}
-\renewcommand\ifne[1]{\csname @\if\relax\detokenize{#1}\relax first\else second\fi oftwo\endcsname\iffalse\iftrue}
+\renewcommand\ifne[1]{\csname @\ifcat $\detokenize{#1}$first\else second\fi oftwo\endcsname\iffalse\iftrue}
\let\newif\org@newif
\font\umranda=umranda \def\Ch{\char'}
%
@@ -4899,7 +5023,7 @@ and etextools-examples.tex
\begin{document}
\title{\vskip-2cm\thispackage\ examples}
\subtitle{Examples for some macros provided by the \thispackage package}
-\author{\small<FC -- April 20, 2010>}
+\author{\small<FC -- December 12, 2010>}
\date{}
%
\newsavebox\helpbox \newsavebox\helpboxx
@@ -5171,13 +5295,20 @@ category code of \# to 12 (other):
\end{document}\endinput
%</example>
% \end{macrocode}
-%
+%
% \phantomsection
% \Section*{Revision history}
% \addcontentsline{toc}{section}{\texorpdfstring\dr{}\hskip\dimexpr\cftsecnumwidth-4pt Revision history}^^A not in .cmd file
%
% \begin{changelog}\footnotesize
-%
+%
+% \begin{release}{3.1415926}{2010-12-07}
+% \item Addition of \cmdref{@char@testopt}
+% \item Correction of a but in \cmdref{ifempty} and \cmdref{ifnotempty}.
+% \item Correction (again...) in \cmdref{thefontname}: now use of \cs{nfss@text} (better if in math mode).
+% \item Documentation revisited with \Xpackage{interfaces}.
+% \end{release}
+%
% \begin{release}{3.14159}{2010-04-20}
% \item \cs{ettl@thefontname} overwrote \cs{T1/cmr/m/n/10} on the log file when the font \sty{ecmr1000} was used.\\
% Fixed + modification of \cmdref{thefontname} in order to get both \TeX{} and \LaTeX{} font names.
diff --git a/Master/texmf-dist/source/latex/etextools/etextools.ins b/Master/texmf-dist/source/latex/etextools/etextools.ins
index 4026cb2ada4..45abfb09e5c 100644
--- a/Master/texmf-dist/source/latex/etextools/etextools.ins
+++ b/Master/texmf-dist/source/latex/etextools/etextools.ins
@@ -19,11 +19,10 @@
%% etextools.sty, etextools.pdf, etextools.ins,
%% and etextools-examples.tex
%%
-%%% etextools : e-TeX tools for LaTeX Users and package Writers (v.3.14159 - 2010/04/20)
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: etextools 2010/04/20 v.3.14159 e-TeX tools for LaTeX Users and package Writers *}
+\Msg{* Package: etextools 2010/12/07 v.3.1415926 e-TeX tools for LaTeX Users and package Writers *}
\Msg{************************************************************************}
\keepsilent