summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-25 22:27:28 +0000
committerKarl Berry <karl@freefriends.org>2010-03-25 22:27:28 +0000
commit659c4a9a1debbae051fe0dcb5d6e35633902f245 (patch)
treebfac3ae42b504982c8747d9faddba6364282b20e /Master/texmf-dist/tex
parentb47f5f2d46724e285083ea548036a718d8c849af (diff)
etextools update (25mar10)
git-svn-id: svn://tug.org/texlive/trunk@17557 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/etextools/etextools.sty18
1 files changed, 17 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/etextools/etextools.sty b/Master/texmf-dist/tex/latex/etextools/etextools.sty
index 50b65479f09..f6d54d4572d 100644
--- a/Master/texmf-dist/tex/latex/etextools/etextools.sty
+++ b/Master/texmf-dist/tex/latex/etextools/etextools.sty
@@ -178,6 +178,9 @@
%% \showcs { csname }
\providecommand*\showcs[1]{\expandafter\show\csname#1\endcsname}
+%% \showthecs { csname }
+\providecommand*\showthecs[1]{\expandafter\showthe\csname#1\endcsname}
+
%% \meaningcs { csname }
\providecommand\meaningcs[1]{\romannumeral-`\q
\csname\ifcsdef{#1}{ettl@meaningcs\endcsname{#1}}
@@ -275,6 +278,19 @@
oftwo\endcsname}
\def\ettl@ifxsingle#1#2#3#4{\ettl@nbk#1//{\ifx#1#2#3\else#4\fi}{#4}//}
+%% \iffirsttoken token { string }{ true }{ false }
+\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}
+
%% \ifOneToken{ token }{ true }{ false }
\newcommand\ifOneToken[1]{\romannumeral\csname rmn@\ettl@firstspace{#1}
{\ettl@nbk#1//{second}{\if @\detokenize{#1}@second\else first\fi}//}
@@ -840,7 +856,7 @@
\expandafter##7\expandafter{\number\numexpr##1+1}{##2}##4##5//{##7}{##8}/End^^a7List/}
#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}}}