summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/commado
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-30 23:32:29 +0000
committerKarl Berry <karl@freefriends.org>2012-11-30 23:32:29 +0000
commit1940e85fb00c285d08ff92d6f58559f87aba6cd6 (patch)
tree676d194fd93c842d447271383a3f1787b0d1bea8 /Master/texmf-dist/tex/generic/commado
parentb415b4e1fc380c1246bcc741b9e31f1cee911a3b (diff)
new latex package commado (29nov12)
git-svn-id: svn://tug.org/texlive/trunk@28396 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/commado')
-rw-r--r--Master/texmf-dist/tex/generic/commado/commado.RLS2
-rw-r--r--Master/texmf-dist/tex/generic/commado/commado.sty87
-rw-r--r--Master/texmf-dist/tex/generic/commado/filesdo.sty55
3 files changed, 144 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/commado/commado.RLS b/Master/texmf-dist/tex/generic/commado/commado.RLS
new file mode 100644
index 00000000000..ac78cd6a6e2
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/commado/commado.RLS
@@ -0,0 +1,2 @@
+\ProvidesFile{commado.RLS} %% RELEASE INFO
+ [2012/11/27 v0.1 initial]
diff --git a/Master/texmf-dist/tex/generic/commado/commado.sty b/Master/texmf-dist/tex/generic/commado/commado.sty
new file mode 100644
index 00000000000..6bdc458a35c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/commado/commado.sty
@@ -0,0 +1,87 @@
+ \input plainpkg
+% \NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{commado}[2012/11/27 v0.1 iterate on CSL (UL)]
+%%
+%% Copyright (C) 2012 Uwe Lueck,
+%% http://www.contact-ednotes.sty.de.vu
+%% -- author-maintained in the sense of LPPL below --
+%%
+%% This file 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.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% We did our best to help you, but there is NO WARRANTY.
+%%
+%% Please report bugs, problems, and suggestions via
+%%
+%% http://www.contact-ednotes.sty.de.vu
+%%
+\PushCatMakeLetterAt
+%% == Auxiliaries ==
+\ifltx \else %% unless provided by LaTeX already
+ \long\def\@firstoftwo#1#2{#1}
+ \long\def\@secondoftwo#1#2{#1}
+\fi
+%% ... 4 less than
+% \long\def\@firstsecondofthree#1#2#3{#1#2}
+% \long\def\@firstthirdofthree#1#2#3{#1#3}
+%%
+%% == Processing a Comma-Separated List ==
+%% Most of the following code aims at removing the final
+%% space in the comma-separated list.
+%% % `\<cmd>' usually may either refer to a string starting
+%% % with a backslash or to the \emph{token} with the name
+%% % \qtdcode{<cmd>}
+%% % (cf. "\TeX's Tokens" in the \ctanpkgref{dowith} documentation).
+%% A variant of parsing as in 'fifinddo.sty'
+%% (\ctanpkgdref{nicetext} bundle) and
+%% \ctanpkgstyref{bitelist} package is employed
+%% (while I am about to use different approaches there,
+%% one may see here how, inspired by `\@ifblank' in
+%% \ctanpkgstyref{url}).
+%% The purpose of the following `\edef' of
+%% |\DoWithCSL{<cmd>}{<list>}|
+%% is to get a space token after `\@firstoftwo' in the parameter text.
+%% \pagebreak[3]
+\let\CD@final@comma\relax
+\edef\DoWithCSL#1#2{%
+ \CD@final@comma#2CD@final@comma
+ \noexpand\@firstoftwo
+% \noexpand\@firstsecondofthree
+ \space\CD@final@comma
+ \noexpand\@secondoftwo
+% \noexpand\@firstthirdofthree
+ \noexpand\end{#1}{#2}}
+\def\CD@final@comma#1 \CD@final@comma#2#3\end#4#5{%
+% \expandafter\@secondfirstoftwo\expandafter{%
+% #2{#1}#5}{\do@with@csl#4}%
+ #2{\do@with@csl{#4}#1}{\do@with@csl{#4}#5}%
+%% ... 15 vs.\ 13:
+% #2{\do@with@csl{#4}}{#1}{#5}%
+ ,\StopDoing,}
+\catcode`\Q=3 %% not in #1
+\def\do@with@csl#1#2#3,{%
+%% #1 is <cmd>. #2 takes the first token from (remaining) <list>
+%% that is not a space token. Trying to enter a blank
+%% list item would result in using the
+%% \emph{next comma as a list item!}---The following
+%% is an alternative to the analogue in 'domore.sty':
+ \unless@stop@doing#2#3\StopDoing
+ #1{#2#3}\do@with@csl{#1}\StopDoing Q}
+\def\unless@stop@doing#1\StopDoing#2\StopDoing#3Q{#2}
+%% ... somewhat replaces `\@secondfirstoftwo'---but will the
+%% latter be dropped? `\unless@stop@doing' is specific
+%% for `\StopDoing'---but can be used with `\DoWith' too.
+%% TODO %% 2012/11/24
+\catcode`\Q=11
+%%
+%% == Leaving the Package File ==
+\PopLetterCatAt
+\endinput
+%%
+%% == \acro{VERSION HISTORY} ==
+
+v0.1 2012/11/24f. started
+ 2012/11/26 code ready
+ 2012/11/27 documented
diff --git a/Master/texmf-dist/tex/generic/commado/filesdo.sty b/Master/texmf-dist/tex/generic/commado/filesdo.sty
new file mode 100644
index 00000000000..728334419a4
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/commado/filesdo.sty
@@ -0,0 +1,55 @@
+ \input plainpkg
+% \NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{filesdo}[2012/11/27 v0.1 iterate on files (UL)]
+%%
+%% Copyright (C) 2012 Uwe Lueck,
+%% http://www.contact-ednotes.sty.de.vu
+%% -- author-maintained in the sense of LPPL below --
+%%
+%% This file 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.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% We did our best to help you, but there is NO WARRANTY.
+%%
+%% Please report bugs, problems, and suggestions via
+%%
+%% http://www.contact-ednotes.sty.de.vu
+%%
+%% == Documentation ==
+%% For documentation in \acro{PDF} format, see `commado.pdf'.
+%%
+%% == 'commado' Required ==
+%% 'filesdo' is based on 'commado':
+\RequirePackage{commado}
+%%
+%% == Category Code ==
+%% Use `@' as part of ``command names'' ('plainpkg', 'stacklet'):
+\PushCatMakeLetterAt
+%%
+%% == User Commands ==
+%% |\DoWithExtBases{<cmd>}{<ext>}{<basenames>}| \
+%% runs `<cmd>{<base>.<ext>}' for all items <base>
+%% in <basenames> and a single filename extension <ext>:
+\def\DoWithExtBases#1#2{\DoWithCSL{\do@with@ext@base{#1}{#2}}}
+\def\do@with@ext@base#1#2#3{#1{#3.#2}}
+%% |\DoWithBasesExts{<cmd>}{<basenames>}{<exts>}| \
+%% runs `<cmd>{<base>.<ext>}' for all items <base>
+%% in <basenames> and all items <ext> in <exts>:
+\def\DoWithBasesExts#1#2{\DoWithCSL{\distrib@basenames@do{#1}{#2}}}
+%% `\distrib@basenames@do' exchanges arguments in order to reduce
+%% the task to `\DoWithCSL' and `\DoWithCSL':
+\def\distrib@basenames@do#1#2#3{%
+ \DoWithCSL{\DoWithExtBases{#1}{#3}}{#2}}
+%%
+%% == Leaving the Package File ==
+\PopLetterCatAt
+\endinput
+%%
+%% == \acro{VERSION HISTORY} ==
+
+v0.1 2012/11/24f. started
+ 2012/11/26 code ready
+ 2012/11/27 documented,
+ \DoWithBaseExts -> \DoWithBasesExts