Comprehensive TeX Archive Network

Direc­tory macros/generic/commado

             README for the `commado' bundle

      Iterate on comma-separated and filename lists

                (C) Uwe Lueck 2012/11/29

`commado.sty' provides 


to apply an existing one-parameter macro <cmd> to each item 
in a list <list> in which items are separated by commas. 

`filesdo.sty' provides 


to run <cmd>{<base>.<ext>} for some (at most) one-parameter 
macro <cmd>, each base filename <base> in the comma-separated 
list <bases> and each extension <ext> in the comma-separated 
list <exts>. 

As opposed to LaTeX’s internal \@for, no assignments are 
involved (unless <cmd> uses assignments, "expandability" in 
"TeX’s gullet").

Both packages are "generic," i.e., should work with Plain 
TeX, LaTeX or even other formats, relying on the `plainpkg' 
package for some minimal LaTeX-like behaviour.

RELATED PACKAGES: `loops' and others mentioned in the 
    `dowith' package documentation.

KEYWORDS: macro programming, programming structures, loops, 

REQUIRED PACKAGES: `plainpkg', `stacklet'

LICENSE: The package files `commado.sty', `filesdo.sty' and
    the files `commado.pdf' and `commado.tex' documenting 
    both package files can be redistributed and/or modified
    under the terms of the LaTeX Project Public License;
    either version 1.3c of the License, or any later version, 


    There is NO WARRANTY, indeed this still is somewhat

    The `commado' package is author-maintained in the sense 
    of the license.

The latest public version of the package is available at


A TDS version of the package is available as


Please report bugs, problems, suggestions, and bad English via


Down­load the con­tents of this pack­age in one zip archive (587.6k).

com­mado – Ex­pand­able it­er­a­tion on comma-sep­a­rated and file­name lists

The bun­dle pro­vides two pack­ages: com­mado and filesdo.

The pack­age com­mado pro­vides the com­mand \DoWithCSL:

\DoWithCSL{<cmd>}{<list>} ap­plies an ex­ist­ing one-pa­ram­e­ter macro <cmd> to each item in a list <list> in which terms are sep­a­rated by com­mas.

The pack­age filesdo pro­vides the com­mand \DoWithBas­esExts:


which runs the sin­gle pa­ram­e­ter com­mand <cmd> on each file whose base and ex­ten­sion are re­spec­tively from the comma-sep­a­rated lists <bases> and <exts>.

Th­ese ‘loop’-like com­mands are (them­selves) en­tirely ex­pand­able.

The pack­ages rely on pack­ages plainpkg, and stack­let

Li­cense The Project Public Li­cense 1.3
Copy­right2012 Uwe Lück
Main­tainerUwe Lück
TDS archivecommado.tds.zip
Con­tained inTeX Live as com­mado
MiKTeX as com­mado
Topics sup­port for de­vel­op­ment of macros
See also loops
Guest Book Sitemap Contact Contact Author