diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-25 22:27:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-25 22:27:28 +0000 |
commit | 659c4a9a1debbae051fe0dcb5d6e35633902f245 (patch) | |
tree | bfac3ae42b504982c8747d9faddba6364282b20e /Master/texmf-dist/source | |
parent | b47f5f2d46724e285083ea548036a718d8c849af (diff) |
etextools update (25mar10)
git-svn-id: svn://tug.org/texlive/trunk@17557 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/etextools/etextools.drv | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/etextools/etextools.dtx | 89 |
2 files changed, 72 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/etextools/etextools.drv b/Master/texmf-dist/source/latex/etextools/etextools.drv index 3a0cb5057bb..16f7d00391f 100644 --- a/Master/texmf-dist/source/latex/etextools/etextools.drv +++ b/Master/texmf-dist/source/latex/etextools/etextools.drv @@ -38,12 +38,13 @@ \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} +\csdef{ltd@email}#1{\href{mailto:#1}{\footnotesize\mdseries#1}} \titlepage{% title={The \Thispackage 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}, - email={\footnotesize\mdseries florent.chervet@free.fr}, + email={florent.chervet@free.fr}, revision={\footnotesize\thisrevision}, date={\footnotesize\thisdate}} \hypersetup{% diff --git a/Master/texmf-dist/source/latex/etextools/etextools.dtx b/Master/texmf-dist/source/latex/etextools/etextools.dtx index 1882d49d6f2..01ed377c72f 100644 --- a/Master/texmf-dist/source/latex/etextools/etextools.dtx +++ b/Master/texmf-dist/source/latex/etextools/etextools.dtx @@ -112,12 +112,13 @@ and etextools-examples.tex \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} +\csdef{ltd@email}#1{\href{mailto:#1}{\footnotesize\mdseries#1}} \titlepage{% title={The \Thispackage 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}, - email={\footnotesize\mdseries florent.chervet@free.fr}, + email={florent.chervet@free.fr}, revision={\footnotesize\thisrevision}, date={\footnotesize\thisdate}} \hypersetup{% @@ -134,7 +135,7 @@ and etextools-examples.tex %</driver> % \fi % -% \CheckSum{2866} +% \CheckSum{2899} % % \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 @@ -513,7 +514,7 @@ and etextools-examples.tex % \setbox\helpboxx\vbox{\hbox to\z@{\hbox to\hsize{\hfil\copy\helpbox\cleaders\copy\myb\hskip14cm\reflectbox{\copy\helpbox}\hfil}\hss}\printtitlepage} % \box\helpboxx % ^^A\printtitlepage -% \AddBookMark{attr{/F 2}goto page 1{/FitH}{etextools}} +% \AddBookMark{attr{/F 2}goto page 1{/FitH 1000}{etextools}} % % \begingroup\makeatletter\parfillskip\z@ % ^^A\cftsetpnumwidth{0pt} @@ -883,13 +884,18 @@ and etextools-examples.tex % % \cmditem+{thefontname} % -% \csbf{thefontname} will display (in Computer Modern font at 10 points) the name of the current font selected. +% \csbf{thefontname}\notFE will display (in Computer Modern font at 10 points) the name of the current font selected. % Something like:§ % \qquad|select font musix11 at 10.0pt| % -% \cmditem{showcs}{ csname } +% \cmditem[showcs]@{showcs \tsptb showthecs} +% \cmditem-{showcs}{ csname } % -% \cs{showcs} does \cs{show} on the named control sequence. +% \cs{showcs}\notFE does \cs{show} on the named control sequence. +% +% \cmditem-{showthecs}{ csname } +% +% \cs{showthecs}\notFE does \cs{showthe} on the named control sequence. % % \cmditem{meaningcs}{ csname } % @@ -927,7 +933,7 @@ and etextools-examples.tex % 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} -% \medbreak +% \ClearPage* % % \cmditem{ifdefcount}{ single token }{ true }{ false } % \cmditem*{ifdeftoks}{ single token }{ true }{ false } \FEII* @@ -992,7 +998,7 @@ and etextools-examples.tex % if the mandatory argument is a \prm{string} equal to \CH{\stform[\blue]*$__{12}$} or \CH{\stform[\blue][$__{12}$}^^A] % there will be a problem (and most probably an error). Therefore, \textbfsf{when using \csbf{avoidvoid} you are encourage to % specify always an option, even if it is empty.} -% +% \ClearPage* % \cmditem-{avoidvoidcs} [ replacement code ]{ csname } \FEII* % \cmditem-{avoidvoidcs\stform*}[ replacement code ]{ csname } \FEII* % @@ -1052,7 +1058,7 @@ and etextools-examples.tex % % \begin{ltxsyntax} % -% \cmditem[ifsingletoken]+@{ifsingletoken\db~\tsptb ifOneToken} +% \cmditem[ifsingletoken]+@{ifsingletoken~\db\tsptb ifOneToken} % \cmditem-{ifsingletoken}{ single token }{ code }{ true }{ false } % % \csbf{ifsingletoken}\FEII expands to \prm{true} only if \textsfbf{\prmb{code} is a single token and is equal @@ -1091,7 +1097,7 @@ and etextools-examples.tex % % {\rmk \cs{ifOneToken} is used in the definition of \cmdref{FE@modifiers}.} % -% \ClearPage* +% \ClearPage % \cmditem[ifsinglechar]+@{ifsinglechar~\db\tsptb ifOneChar} % \cmditem-{ifsinglechar}{ single token }{ string }{ true }{ false } % @@ -1146,7 +1152,17 @@ and etextools-examples.tex % % If \prm{string} contains \textbfsf{only spaces}, \cs{ifOneCharWithBlanks} expands \prmb{false}. % -% \cmditem{iffirstchar}{ string1 }{ string2 }{ true }{ false } +% \cmditem[iffirsttoken]@{iffirsttoken~\spot\tsptb iffirstchar} +% \cmditem-{iffirsttoken}{ string1 }{ string2 }{ true }{ false } +% +% \csbf{iffirsttoken}\FEII compares the very first tokens of each \prm{string}. The +% comparison is done using \csbf{ifx} and the macro is fully expandable. Neither \prm{string1} nor \prm{string2} +% is expanded before comparison. Example:§ +% \qquad|\iffirsttoken \relax{\relax\textbf{hello world}}{begins with \relax}{begins with something else}| +% +% \qquad|\iffirsttoken|\mprm{}\mprm{whatever}¤expands\prmb{true} only if \prmb{whatever} is empty. +% +% \cmditem-{iffirstchar}{ string1 }{ string2 }{ true }{ false } % % \csbf{iffirstchar}\FEII compares the character codes of the \textbf{first} characters of each \prm{string}. The % comparison is \emph{catcode agnostic} and the macro is fully expandable. Neither \prm{string1} nor \prm{string2} @@ -1157,7 +1173,7 @@ and etextools-examples.tex % % \qquad|\iffirstchar|\mprm{}\mprm{whatever}¤expands\prmb{true} only if \prmb{whatever} is empty. % -% \ClearPage* +% \ClearPage % \cmditem+{ifiscs}{ string }{ true }{ false } % % \csbf{ifiscs}\FEII will expand \prmb{true} only \textbfsf{if \prmb{string} is a single control word.} \prm{string} @@ -1384,7 +1400,8 @@ and etextools-examples.tex % % You may also check that \prm{stringA} may be a blank space (but as for now, you cannot % replace blank spaces at the end of the string...). -% \ClearPage*\newcommand\¤[1][]{\textcolor{blue}{\bfseries{\vbbf\textvisiblespace}#1}} +% \ClearPage +% \newcommand\¤[1][]{\textcolor{blue}{\bfseries{\vbbf\textvisiblespace}#1}} % % Let's see how this works (\¤\ is zero or more spaces):§§\enlargethispage{5\baselineskip} % \def\YES{\textcolor{blue}{\bfseries YES}} \newcommand\bigskipneg{\vskip-8pt} @@ -2858,6 +2875,19 @@ and etextools-examples.tex % % \iffalse %<package> +%<package>%% \showthecs { csname } +% \fi +% +%\begin{Macro}{showthecs} +% \cs{showthecs} shows the value of the named register: +% \begin{macrocode} +\providecommand*\showthecs[1]{\expandafter\showthe\csname#1\endcsname} +% \end{macrocode} +%\end{Macro} +% +% +% \iffalse +%<package> %<package>%% \meaningcs { csname } % \fi % @@ -3072,6 +3102,27 @@ and etextools-examples.tex % % \iffalse %<package> +%<package>%% \iffirsttoken token { string }{ true }{ false } +% \fi +%\begin{Macro}{iffirsttoken} +% \cs{iffirsttoken} tests if \#1 and \#2 begins with the same token (the \cs{ifx}-test is used): +% \begin{macrocode} +\providecommand\iffirsttoken[2]{\romannumeral\csname rmn@% + \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 + \ettl@firstspace{#2}{first}{second}}//}% + {\ettl@nbk#1//% + {\if @\detokenize{#2}@secondoftwo\ettl@csname\fi + \ettl@firstspace{#1}{first}{second}} + {\if @\detokenize{#1#2}@first\else second\fi}}//% + oftwo\endcsname} +% \end{macrocode} +%\end{Macro} +% +% \iffalse +%<package> %<package>%% \ifOneToken{ token }{ true }{ false } % \fi % @@ -3799,7 +3850,7 @@ and etextools-examples.tex % \begin{Macro}{aftergroup@def} % The macro is based on \xpackage{letltxmacro} package. Therefore, \cs{aftergroup@def} works with commands with optional % 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$ call to \cs{aftergroup} primitive.}:§§ +% {\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]{% \let\etex@let@primitive\let \def\let{\global\etex@let@primitive}% @@ -3840,8 +3891,8 @@ and etextools-examples.tex % \cs{ettl@ifnextchar} is based on the \cmdref={character-test} rather than the |\ifx|-test. See the example for % explanation on its behaviour.§ % \csbf{ettl@ifnextchar} is used in the definition of \cmdref*{aftergroup@def} and \cmdref*{@ifchar} (of course...).§ -% We take advantage of delimited definitions to exits from |\if|...|\fi| conditionnals (even in the case where -% the macro parameter may be |\else|, |\if| or |\fi|...): +% We take advantage of delimited definitions to exit from |\if|...|\fi| conditionnals (even in the case where +% 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}% @@ -4254,7 +4305,7 @@ and etextools-examples.tex }\ettl@defcmdparser }\expandafter\ettl@defcmdparser\expandafter{\romannumeral-`\q\@gobblescape#2}}} % \end{macrocode} -% \cs{ettl@defcmdparser} doeas the definitions: \cs{parser->start} initiates the loop (and add a separator +% \cs{ettl@defcmdparser} does the definitions: \cs{parser->start} initiates the loop (and add a separator % at the end of the list) and \cs{parser->loop} loops into the list, expanding the (optional, default |\do|) user code % for each item. % @@ -4280,7 +4331,7 @@ and etextools-examples.tex \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}} - {\ettl@forloop{\expandafter#2\expandafter*\expandafter+}{####1}}} + {\ettl@forloop{\expandafter#2\expandafter*}{####1}}} {\@ifchar+{\@ifchar*% {\ettl@forloop{\expandafter#2\expandafter*\expandafter+}{[####1]####2}} {\ettl@forloop{\expandafter#2\expandafter+}{[####1]####2}}} @@ -4876,4 +4927,4 @@ and etextools-examples.tex % \PrintIndex % \makeatletter % \immediate\write\@mainaux{\noexpand\newlabel{LastPage}{{}{\thepage}{}{page.\arabic{page}}{}}} -% \Finale +% \Finale
\ No newline at end of file |