The following code uses the etoolbox package to convert a list a,b,c into an internal list (called \mylist) and then typesets that with colons: a:b:c:. However, when I load the etextools package (by uncommenting the second line), I get no list output.

A list:

I suspect it is is a bug since etextools claims to depend on etoolbox. Is this a bug or am I doing something wrong? In either case, how can I use \dolistloop with etextools (which I want for goodies like \expandnext)?


  • \show\mylist produces the same output a|b|c| in both cases, so the problem is with \dolistloop which expands to \forlistloop\do
  • The \forlistloop command becomes substantially more complicated when etextools is used.
  • This question might be relevant (but not obviously).
  • The \DeclareCmdListParser\listloop{|} command in etextools.sty is responsible for changing \forlistloop. Not sure yet why this breaks the behaviour.
    – mforbes
    Mar 26, 2012 at 22:12
  • If one is committed to using etextools, then \listloop{\mylist} works where \dolistloop{\mylist} fails. I would still like code that works with and without etextools.
    – mforbes
    Mar 26, 2012 at 22:19
  • 2
    Just a note that this bug has been noticed before. I also sent a message to Florent Chervet mentioning this bug.
    – mforbes
    Mar 28, 2012 at 4:13

2 Answers 2


This might be a bug in the etextools package. In fact, \forlistloop is currently redefined in a way incompatible with the etoolbox package. Hence, try:

  • This does not explain what the problem is, but is a reasonable practical solution (though may create other issues with etextools). Hopefully the maintainer will step in, confirm the bug, and have a suggestion for fixing it.
    – mforbes
    Apr 12, 2012 at 17:44
  • @mforbes: Both the etoolbox package and the etextools package define \forlistloop, but unfortunately not with the same argument signature. This is the problem.
    – mhp
    Apr 12, 2012 at 21:07
  • @mforbes: If you need the \dolistloop of the etoolbox package, but otherwise the \forlistloop of the etextools package don’t restore \forlistloop and use \patchcmd to replace \forlistloop with \origforlistloop in the definition of \dolistloop.
    – mhp
    Apr 13, 2012 at 6:29

If you are willing to use catoptions package, you can do

%\usepackage{etoolbox} % you may load this if you like
%\usepackage{etextools} % load if you like

% Add these elements to list container \mylist:

% User callback for every item in \mylist. Don't print the last colon (:):

% Do the looping over elements of \mylist. The star (*) form of \indrisloop expects
% a macro whose top level expansion contains the list items:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .