Debian Codegraph @

texmf-dist/source/generic/dowith/domore.tex

raw
1 \ProvidesFile{domore.tex}[2015/11/14 documenting domore files]
2 \title{\pkg{domore}\\---\\Some More Commands for Lists of Tokens}
3 % \listfiles
4 { \RequirePackage{makedoc} \ProcessLineMessage{}
5 \renewcommand\mdSectionLevelOne {\string\subsection}
6 \renewcommand\mdSectionLevelTwo {\string\subsubsection}
7 \MainDocParser{\SectionLevelTwoParseInput}
8 \HeaderLines{17}
9 \MakeSingleDoc{domore.sty}
10 \MakeSingleDoc{reversdo.sty}
11 \MakeSingleDoc{domodes.sty}
12 }
13 \documentclass[fleqn]{article}%% TODO paper dimensions!?
14 \input{makedoc.cfg} %% shared formatting settings
15 \MDkeywords{Macro programming, programming structures,
16 loops, list macros}
17 \newcommand*{\headersec}{%
18 \subsection{Package File Header---\pkg{plainpkg} and Legalese}}
19 \usepackage{catchdq} \catchdqs %% 2012/11/19
20 \AddToMacro{\mdStartPackageCode}{\MakeOther\"} %% 2012/11/19
21 %% something moved to makedoc.cfg from here 2013/03/21
22 \newif\ifmultmore %% 2012/11/19
23 %%% \multmoretrue %% 2015/11/14 TODO domodes/revers... with plainpkg!
24 \MDfinaldatechecks
25 \sloppy
26 \begin{document}
27 \maketitle
28 \begin{MDabstract}
29 \ifmultmore
30 This document describes packages that do similar things
31 as the 'dowith' package or extend it.
32 \else
33 'domore.sty' is a package that enhances 'dowith.sty''s
34 `\DoWith' (without assignments)
35 and `\setdo' commands for applying something
36 (e.g., `\do') to each item of an "arglist".
37 Each item may consist of two or more arguments for a macro,
38 and some "separator" material may be inserted between the
39 applications to items. A practiced application has been
40 generating inline lists of links that are separated
41 by \qtdcode{~\string|~}.
42 'domore.sty' is (to some extent) format-independent
43 by means of the \ctanpkgref{plainpkg} and 'stacklet' packages.
44 \fi
45 % \MDaddtoabstract{Required Packages}
46 % \ctanpkgref{plainpkg}, 'stacklet'
47 \MDaddtoabstract{Related Packages} cf. `dowith.pdf'.
48 \end{MDabstract}
49 \tableofcontents
50
51 \edef\domore{\ifmultmore\noexpand\MetaVar domore>\else domore\fi}
52 % \section{Shared Features of Usage}
53 \ifmultmore
54 \section{Shared Features of Usage}
55 All the packages described in this document
56 are "\pkg{plainpkg} packages"
57 \else
58 \section{Making 'domore.sty' Available}
59 The 'domore' package is a "\pkg{plainpkg} package"
60 \fi
61 in the sense of the
62 \ctanpkgdref{plainpkg}
63 documentation that exhibits details of what is summarized here.
64 Therefore:
65 \begin{itemize}
66 \item \ifmultmore All of them require \else It is required \fi
67 that \TeX\ finds `plainpkg.tex'
68 as well as `stackrel.sty' from the
69 \ctanpkgdref{catcodes} bundle.
70 \item In order to load \file{\domore.sty}%%%
71 \ifmultmore\ (where \domore\ is `domore', `domodes', or `reversdo')\fi,
72 type
73 \begin{description}
74 \ifmultmore\cmdboxitem|\usepackage{<domore>}|
75 \else\cmdboxitem|\usepackage{domore}| \fi
76 \ within a \LaTeX\ document
77 preamble, \
78 \ifmultmore\cmdboxitem|\RequirePackage{<domore>}|
79 \else\cmdboxitem|\RequirePackage{domore}| \fi
80 \ in a "\pkg{plainpkg} package", or \
81 \ifmultmore\cmdboxitem|\input <domore>.sty|
82 \else\cmdboxitem|\input domore.sty| \fi
83 \end{description}
84 $\dots$ \ or perhaps `\input{<domore>.sty}'?
85 \end{itemize}
86
87 \section{Remark on the Style of Code Documentation}
88 In `dowith.pdf', the documentation of the 'dowith' package,
89 in the section about "\TeX's tokens," I have tried to explain
90 the difference between \TeX\ input code and the tokens that
91 arise from it. In order to really understand what packages
92 in the 'dowith' bundle do, one should think of the behaviour
93 of the \emph{tokens}. For convenience however, I may rather
94 fall back into the usual confusion here. After reading the
95 documentation `dowith.pdf' of `dowith.sty', you may be able
96 to guess successfully what is meant below.
97
98 % \section{Overview of Packages Described in \file{\jobname.pdf}}
99 \ifmultmore
100 \section{Overview of Packages Described in \file{\jobname.pdf}}
101 \label{sec:over}
102 The present document describes the packages provided by the
103 \ctanpkgref{dowith} bundle apart from 'dowith.sty' itself
104 for applying something to each item from some list.
105 \begin{enumerate}
106 \item
107 \else
108 \section{Overview of Commands}
109 \fi
110 \strong{\pkg{domore.sty}} provides a more powerful version
111 of 'dowith.sty''s
112 \[|\DoWith{<repeat>}<args>\StopDoing|\]
113 acting on an "arglist" <args>
114 where <repeat> may be more complex than with 'dowith.sty'.
115 Based on this, another variant |\DoWithMore| of `\DoWith'
116 is provided where <repeat> may be a macro with more than
117 one argument. With \LaTeX\ e.g., <repeat> may be |\do|
118 defined by \[|\setdo[<digit>]<opt>{<replace>}|\]
119 an extension of 'dowith.sty''s `\setdo'.
120 Further,
121 \[|\DoSeparateWith{<repeat>}{<sep>}<args>\StopDoing|\]
122 inserts "separator material" <sep> between the applications
123 of <repeat> to the items in <args>. Another
124 |\DoSeparateWithMore| combines the features of the two
125 previous macros. I have used this with 'blog.sty' from
126 the \ctanpkgref{morehype} bundle for generating inline
127 lists of links, separated by something like \qtdcode{~\string|~},
128 in \acro{HTML} documents.
129
130 As auxiliaries, variants |\@firstsecondoftwo| and
131 |\@secondfirstoftwo| of \LaTeX's `\@firstofone' are introduced.
132 \ifmultmore
133 \end{enumerate}
134
135 \section{'domore.sty'}
136 An overview of what 'domore.sty' provides has been given in
137 Section~\ref{sec:over}.
138 For details, see the comments to the package's code below.
139 \else
140
141 For details, see the comments to the package's code below.
142 \section{Contents of 'domore.sty'}
143 \fi
144 \headersec
145 \input{domore.doc}
146
147 \MakeOther\"
148 \ifmultmore
149 \section{'domodes.sty'}
150 See Section~\ref{sec:domodes-cmds} for the commands provided.
151 \headersec
152 \input{domodes.doc}
153
154 \section{'reversdo.sty'}
155 See Section~\ref{sec:reversdo-cmds} for the commands provided.
156 \headersec
157 \input{reversdo.doc}
158
159 \fi
160 \end{document}
161
162 VERSION HISTORY
163
164 2012/10/23 for v0.2 started
165 2012/11/05ff. for v0.3
166 2013/03/21f. for v0.31 \MDfinaldatecheck