| 1 |
\input plainpkg |
| 2 |
% \NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 3 |
\ProvidesPackage{filesdo}[2012/11/27 v0.1 iterate on files (UL)] |
| 4 |
%% |
| 5 |
%% Copyright (C) 2012 Uwe Lueck, |
| 6 |
%% http://www.contact-ednotes.sty.de.vu |
| 7 |
%% -- author-maintained in the sense of LPPL below -- |
| 8 |
%% |
| 9 |
%% This file can be redistributed and/or modified under |
| 10 |
%% the terms of the LaTeX Project Public License; either |
| 11 |
%% version 1.3c of the License, or any later version. |
| 12 |
%% The latest version of this license is in |
| 13 |
%% http://www.latex-project.org/lppl.txt |
| 14 |
%% We did our best to help you, but there is NO WARRANTY. |
| 15 |
%% |
| 16 |
%% Please report bugs, problems, and suggestions via |
| 17 |
%% |
| 18 |
%% http://www.contact-ednotes.sty.de.vu |
| 19 |
%% |
| 20 |
%% == Documentation == |
| 21 |
%% For documentation in \acro{PDF} format, see `commado.pdf'. |
| 22 |
%% |
| 23 |
%% == 'commado' Required == |
| 24 |
%% 'filesdo' is based on 'commado': |
| 25 |
\RequirePackage{commado} |
| 26 |
%% |
| 27 |
%% == Category Code == |
| 28 |
%% Use `@' as part of ``command names'' ('plainpkg', 'stacklet'): |
| 29 |
\PushCatMakeLetterAt |
| 30 |
%% |
| 31 |
%% == User Commands == |
| 32 |
%% |\DoWithExtBases{<cmd>}{<ext>}{<basenames>}| \ |
| 33 |
%% runs `<cmd>{<base>.<ext>}' for all items <base> |
| 34 |
%% in <basenames> and a single filename extension <ext>: |
| 35 |
\def\DoWithExtBases#1#2{\DoWithCSL{\do@with@ext@base{#1}{#2}}} |
| 36 |
\def\do@with@ext@base#1#2#3{#1{#3.#2}} |
| 37 |
%% |\DoWithBasesExts{<cmd>}{<basenames>}{<exts>}| \ |
| 38 |
%% runs `<cmd>{<base>.<ext>}' for all items <base> |
| 39 |
%% in <basenames> and all items <ext> in <exts>: |
| 40 |
\def\DoWithBasesExts#1#2{\DoWithCSL{\distrib@basenames@do{#1}{#2}}} |
| 41 |
%% `\distrib@basenames@do' exchanges arguments in order to reduce |
| 42 |
%% the task to `\DoWithCSL' and `\DoWithCSL': |
| 43 |
\def\distrib@basenames@do#1#2#3{% |
| 44 |
\DoWithCSL{\DoWithExtBases{#1}{#3}}{#2}} |
| 45 |
%% |
| 46 |
%% == Leaving the Package File == |
| 47 |
\PopLetterCatAt |
| 48 |
\endinput |
| 49 |
%% |
| 50 |
%% == \acro{VERSION HISTORY} == |
| 51 |
|
| 52 |
v0.1 2012/11/24f. started |
| 53 |
2012/11/26 code ready |
| 54 |
2012/11/27 documented, |
| 55 |
\DoWithBaseExts -> \DoWithBasesExts |