summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/etoolbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-05 21:55:52 +0000
committerKarl Berry <karl@freefriends.org>2018-02-05 21:55:52 +0000
commit0049de487f3ccdc2ee7b775d7d0da67d81b888c8 (patch)
treee87982b8e383863ffd7047f3bbdb514a21fa4095 /Master/texmf-dist/tex/latex/etoolbox
parent8b4451636905feb26dd54d7ad87238ccb6ea9b43 (diff)
etoolbox (5feb18)
git-svn-id: svn://tug.org/texlive/trunk@46550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoolbox')
-rw-r--r--Master/texmf-dist/tex/latex/etoolbox/etoolbox.def2
-rw-r--r--Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty57
2 files changed, 34 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def
index 50b5be7a0bd..e4cb93ea8af 100644
--- a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def
+++ b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def
@@ -1,5 +1,5 @@
\ProvidesFile{etoolbox.def}
- [2018/02/03 v2.5a etoolbox debug messages (JAW)]
+ [2018/02/04 v2.5b etoolbox debug messages (JAW)]
\begingroup
\makeatletter
diff --git a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty
index 5f92f1d4fc8..57cb2f2c69f 100644
--- a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty
+++ b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{etoolbox}
- [2018/02/03 v2.5a e-TeX tools for LaTeX (JAW)]
+ [2018/02/04 v2.5b e-TeX tools for LaTeX (JAW)]
\begingroup
\@ifundefined{eTeXversion}
@@ -1502,19 +1502,20 @@
\long\def\noexpand#1####1{%
\expandafter\noexpand
\csname etb@lst@\expandafter\@gobble\string#1\endcsname
- \space####1\noexpand#2\noexpand\etb@lst@q@end\noexpand#2&}%
+ \noexpand\@nil####1\noexpand#2\noexpand\etb@lst@q@end\noexpand#2&}%
\long\csdef{etb@lst@\expandafter\@gobble\string#1}%
- ####1\noexpand#2####2\noexpand#2{%
- \noexpand\etb@listitem\noexpand\do{####1}%
- \noexpand\ifx\noexpand\etb@lst@q@end####2\noexpand\@empty
+ ####1\noexpand#2{%
+ \noexpand\expandafter\noexpand\ifx\noexpand\expandafter
+ \noexpand\etb@lst@q@end\noexpand\@gobble####1\noexpand\@empty
\noexpand\expandafter\noexpand\@firstoftwo
\noexpand\else
\noexpand\expandafter\noexpand\@secondoftwo
\noexpand\fi
{\noexpand\listbreak}
- {\expandafter\noexpand
+ {\noexpand\etb@listitem\noexpand\do{####1}%
+ \expandafter\noexpand
\csname etb@lst@\expandafter\@gobble\string#1\endcsname
- \space####2\noexpand#2}}}%
+ \noexpand\@nil}}}%
\@tempa}
\def\etb@lst@q@end{\etb@lst@q@end}
@@ -1525,22 +1526,27 @@
\long\def\noexpand#1####1####2{%
\expandafter\noexpand
\csname etb@lst@\expandafter\@gobble\string#1\endcsname
- {####1}\space####2\noexpand#2&}%
- \long\csdef{etb@lst@\expandafter\@gobble\string#1}####1####2\noexpand#2####3&{%
- \noexpand\etb@listitem{####1}{####2}%
- \noexpand\ifblank{####3}
+ {####1}\noexpand\@nil####2\noexpand#2\noexpand\etb@lst@q@end\noexpand#2&}%
+ \long\csdef{etb@lst@\expandafter\@gobble\string#1}####1####2\noexpand#2{%
+ \noexpand\expandafter\noexpand\ifx\noexpand\expandafter
+ \noexpand\etb@lst@q@end\noexpand\@gobble####2\noexpand\@empty
+ \noexpand\expandafter\noexpand\@firstoftwo
+ \noexpand\else
+ \noexpand\expandafter\noexpand\@secondoftwo
+ \noexpand\fi
{\noexpand\listbreak}
- {\expandafter\noexpand
+ {\noexpand\etb@listitem{####1}{####2}%
+ \expandafter\noexpand
\csname etb@lst@\expandafter\@gobble\string#1\endcsname
- {####1}\space####3}&}}%
+ {####1}\noexpand\@nil}}}%
\@tempa}
\long\def\etb@listitem#1#2{%
- \ifblank{#2}
+ \expandafter\ifblank\expandafter{\@gobble#2}
{}
{\expandafter\etb@listitem@i
- \expandafter{\@firstofone#2}{#1}}}
-\long\def\etb@listitem@i#1#2{#2{#1}}
+ \expandafter{\@gobble#2}{#1}}}
+\long\def\etb@listitem@i#1#2{\expandafter#2\expandafter{\@firstofone#1}}
\newcommand*{\listbreak}{}
\long\def\listbreak#1&{}
@@ -1632,16 +1638,19 @@
\newcommand*{\forlistloop}[2]{%
\expandafter\etb@forlistloop\expandafter{#2}{#1}}
-\long\def\etb@forlistloop#1#2{\etb@forlistloop@i{#2}#1|&}
+\long\def\etb@forlistloop#1#2{\etb@forlistloop@i{#2}#1|\etb@lst@q@end|&}
-\long\def\etb@forlistloop@i#1#2|#3&{%
- \ifblank{#2}
- {}
- {#1{#2}}%
- \ifblank{#3}
+\long\def\etb@forlistloop@i#1#2|{%
+ \ifx\etb@lst@q@end#2\@empty
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
{\listbreak}
- {\etb@forlistloop@i{#1}#3}%
- &}
+ {\ifblank{#2}
+ {}
+ {#1{#2}}%
+ \etb@forlistloop@i{#1}}}
% {<handler>}{<listcsname>} => <handler>{<item1>}<handler>{<item2>}...