diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-14 23:52:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-14 23:52:07 +0000 |
commit | e5bc967eb0517b8377d70914cc45484e5f4f2c7c (patch) | |
tree | c84dda99e2c37af655bc79627867111ec6bb2ba9 /Master/texmf-dist/doc/latex/etextools | |
parent | 3cda51c4ea4ac2affd9b693c6f071d884ab6b951 (diff) |
etextools (11aug09)
git-svn-id: svn://tug.org/texlive/trunk@14676 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/etextools')
-rw-r--r-- | Master/texmf-dist/doc/latex/etextools/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/etextools/etextools-examples.pdf | bin | 76753 -> 79220 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/etextools/etextools-examples.tex | 36 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/etextools/etextools.pdf | bin | 531368 -> 564537 bytes |
4 files changed, 31 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/etextools/README b/Master/texmf-dist/doc/latex/etextools/README index 3a58e58ebe2..e8d69bc75ea 100644 --- a/Master/texmf-dist/doc/latex/etextools/README +++ b/Master/texmf-dist/doc/latex/etextools/README @@ -1,7 +1,7 @@ % This work consists of the main source file etextools.dtx % and the derived files % etextools.sty, etextools.pdf, etextools.ins, -% and etextools-examples.tex +% etextools-examples.tex and etextools-examples.pdf % % Unpacking: % (a) If etextools.ins is present: diff --git a/Master/texmf-dist/doc/latex/etextools/etextools-examples.pdf b/Master/texmf-dist/doc/latex/etextools/etextools-examples.pdf Binary files differindex 12efa0070df..2ed2e95f2c5 100644 --- a/Master/texmf-dist/doc/latex/etextools/etextools-examples.pdf +++ b/Master/texmf-dist/doc/latex/etextools/etextools-examples.pdf diff --git a/Master/texmf-dist/doc/latex/etextools/etextools-examples.tex b/Master/texmf-dist/doc/latex/etextools/etextools-examples.tex index a8b96ae1837..97c800e3fe3 100644 --- a/Master/texmf-dist/doc/latex/etextools/etextools-examples.tex +++ b/Master/texmf-dist/doc/latex/etextools/etextools-examples.tex @@ -22,7 +22,6 @@ %% and etextools-examples.tex %% %%% etextools : more e-TeX useful tools for LaTeX package writers -%%% Florent CHERVET \documentclass[11pt,french,a4paper,oneside]{scrartcl} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} @@ -70,6 +69,20 @@ \section{\cmd{expandnext} examples} +\subsection{Test if the replacement text of macro is really empty} + +\def\xx{ } +\def\testexpandnext{% + \edef\expandnextTest{\string\xx\ is \expandnext\ifempty{\xx}{}{not} empty} +} +\preline\xx +\test{expandnext} + +\def\xx{} +\preline\xx +\test{expandnext} + +\clearpage \subsection{Test if the replacement text of a macro is blank (empty or spaces)} \def\xx{something} @@ -83,7 +96,6 @@ \preline\xx \test{expandnext} -\clearpage \subsection{Detokenize the replacement text of a named-sequence} \def\detokenizecs#1{\expandnext\expandnext\detokenize{\csname #1\endcsname}} \def\testexpandnext{% @@ -98,6 +110,17 @@ }\hrulefill\par \test{ifsinglechar} +\def\testifsinglechar{% + \edef\ifsinglecharTest{\ifsinglechar *{ *}{ single star }{ something else }} +}\hrulefill\par +\test{ifsinglechar} + +\def\testifsinglechar{% + \edef\ifsinglecharTest{\ifsinglechar *{ * }{ single star }{ something else }} +}\hrulefill\par +\test{ifsinglechar} +{\small Note the space \textbf{after} the star $\uparrow$.} + \def\testiffirstchar{% \edef\iffirstcharTest{\iffirstchar *{*hello*}{ first char is star }{ something else }} }\hrulefill\par @@ -105,8 +128,8 @@ \subsection{Fully Expandable starred macros} \def\starmacro#1{\FE@ifstar{#1}\starred\notstarred} -\def\starred#1{your "#1" will be processed by the STAR form} -\def\notstarred#1{your "#1" will be processed by the NORMAL form} +\def\starred#1{your "#1" will be processed by the STAR form} +\def\notstarred#1{your "#1" will be processed by the NORMAL form} \def\testFE@ifstar{% \edef\FE@ifstarTest{\starmacro{sample text}}} \preline\starmacro @@ -154,7 +177,7 @@ \preline\mylist \preline*\BySeven \test{csvloop} -\subsubsection{protected \cmd{testbf}} +\subsubsection{protected \cmd{textbf}} \def\testcsvloop{% \protected@edef\csvloopTest{\csvloop*[\textbf]{hello ,my ,friends}} }\hrulefill\par @@ -172,11 +195,12 @@ \getlistindex{four}\mylist \hrulefill\par \noindent\hskip6pt|\csvtolist*\mylist{one,two,three,four,five,alpha,beta,gamma}|\par\vskip1.5ex -\noindent\hskip6pt\textcolor{blue}{\llap\smex\cmd{getlistindex}{four}\cmd{mylist}}\par\vskip1.5ex +\noindent\hskip6pt\textcolor{blue}{\llap\smex\cmd{getlistindex}\string{four\string}\cmd{mylist}}\par\vskip1.5ex \noindent\hskip6pt\cmd{indexinlist}=\quad{\bfseries\meaning\indexinlist}\par\hrulefill\par \end{document} + \endinput %% %% End of file `etextools-examples.tex'. diff --git a/Master/texmf-dist/doc/latex/etextools/etextools.pdf b/Master/texmf-dist/doc/latex/etextools/etextools.pdf Binary files differindex 77103fd7539..1a20a8f26f6 100644 --- a/Master/texmf-dist/doc/latex/etextools/etextools.pdf +++ b/Master/texmf-dist/doc/latex/etextools/etextools.pdf |