Debian Codegraph @

texmf-dist/doc/support/adhocfilelist/adhocfilelist.htm

raw
1 <!DOCTYPE html>
2 <!-- generated from
3
4 adhocfilelist.tex, 2012/11/19 documenting adhocfilelist (UL),
5
6 with blog.sty, 2013-01-04 -->
7 <html><head> <meta http-equiv="content-type" content="text/html; ISO-8859-1">
8 <meta name="robots" content="index,follow,noarchive">
9 <title>List LaTeX file infos according to command line</title>
10
11 </head><body>
12 <a name="top-of-page"></a>
13
14
15
16
17 <h1><code>adhocfilelist</code> &mdash;
18 <table width="" height="6" border="0" cellpadding="0" cellspacing="0"><tbody>
19 <!-- HVspace -->
20 <tr valign="top"><td></td> </tr>
21
22 </tbody></table>
23 Listing LaTeX Source File Infos<br> According to Command Line</h1>
24
25 <p>
26 <small>
27 [&#8239;<a href="#abstract">abstract</a>&nbsp;|
28 <a href="#over">overview</a>&nbsp;|
29 <a href="#required">requirements</a>&nbsp;|
30 <a href="#install">installing</a>&nbsp;|
31 <a href="#related">related</a>&nbsp;|
32 <a href="#back">background</a>&nbsp;|
33 <a href="#custom">customize</a>&nbsp;|
34 <a href="#idea">idea/thanks</a>&#8239;]&emsp;
35 [&#8239;<i><a href="adhocfilelist.htm">reload</a></i>&#8239;]
36
37 </small>
38
39 <h2><a name="abstract"></a>Abstract<a href="#abstract">.</a></h2>
40 <span style="font-family:sans-serif">adhocfilelist.sh</span> is a shell script with command line options
41 and parameters that displays &lang;<i>info</i>&rang; for files &lang;<i>file</i>&rang;
42 on screen that (i)&nbsp;are indicated on the command line and
43 (ii)&nbsp;contain <code>\ProvidesFile</code><code>{</code><code>&lang;<i>file</i>&rang;</code><code>}</code><code>[</code><code>&lang;<i>info</i>&rang;</code><code>]</code>,
44 <code>\ProvidesPackage</code><code>{</code><code>&lang;<i>file</i>&rang;</code><code>}</code><code>[</code><code>&lang;<i>info</i>&rang;</code><code>]</code>,
45 or <code>\ProvidesClass</code><code>{</code><code>&lang;<i>file</i>&rang;</code><code>}</code><code>[</code><code>&lang;<i>info</i>&rang;</code><code>]</code>.
46 There is one line for each file, formatted about as with LaTeX&rsquo;s
47 <code>\listfiles</code>. This formatting can be varied, and the output may
48 additionally be saved in a plain text file. The files &lang;<i>file</i>&rang;
49 are either (a)&nbsp;listed explicitly, separated by commas, or
50 (b)&nbsp;they are gathered by the Unix <span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> utility.
51 For the latter, <span style="font-family:sans-serif">adhocfilelist</span> provides a somewhat simplified
52 interface, especially for restricting the list of files
53 to those that have been modified &ldquo;today&rdquo; or a few days ago.
54 So you/I can check whether version info was updated correctly,
55 and it may allow <a href="http://www.ctan.org/pkg/filedate" target="_blank"><span style="font-family:sans-serif">filedate</span></a> &ldquo;consistency checks&rdquo;
56 even with <a href="http://www.ctan.org/pkg/xetex" target="_blank"><span style="font-family:sans-serif">XeTeX</span></a> (where <code>\pdffilemoddate</code>
57 is unavailable).
58 <p>
59 The package may thus be considered an extension of the
60 <a href="http://www.ctan.org/pkg/latexfileversion" target="_blank"><span style="font-family:sans-serif">latexfileversion</span></a> (Harald <a href="http://www.ctan.org/author/harders" target="_blank">Harders</a>)
61 and <a href="http://www.ctan.org/pkg/typeoutfileinfo" target="_blank"><span style="font-family:sans-serif">typeoutfileinfo</span></a> packages
62 that display &lang;<i>info</i>&rang; for a <em>single</em> file &lang;<i>file</i>&rang;.
63 Moreover, it is a somewhat simplified interface to the packages
64 <a href="http://www.ctan.org/pkg/myfilist" target="_blank"><span style="font-family:sans-serif">myfilist</span></a>, <a href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span style="font-family:sans-serif">longnamefilelist</span></a>,
65 <a href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span style="font-family:sans-serif">nicefilelist</span></a>, and <a href="http://www.ctan.org/pkg/filedate" target="_blank"><span style="font-family:sans-serif">filedate</span></a>.
66
67 <h2><a name="over"></a>Overview of command line contents<a href="#over">.</a></h2>
68 The general structure of a command line using <span style="font-family:sans-serif">adhocfilelist</span> is
69 <blockquote>
70 <a href="#call">&lang;<i>call</i>&rang;</a>
71 <a href="#opts">&lang;<i>options</i>&rang;</a>
72 <a href="#files">&lang;<i>files</i>&rang;</a>
73
74 </blockquote>
75 The three parts are as follows:
76 <dl>
77 <dt><strong>&lang;<i>call</i>&rang;<a name="call"></a></strong><dd>
78 This is either
79 <ul>
80 </li>
81 <li>&lang;<i>path</i>&rang;<span style="font-family:sans-serif">adhocfilelist.sh</span>
82 where &lang;<i>path</i>&rang; is &ldquo;./&rdquo; or something,
83 depending on where you place the file <span style="font-family:sans-serif">adhocfilelist.sh</span>,
84 or on your use of <a href="http://en.wikipedia.org/wiki/symbolic link" target="_blank">symbolic link</a>s,
85 the environment variable <code><a href="http://en.wikipedia.org/wiki/PATH (variable)" target="_blank">PATH</a></code>,
86 or
87 </li>
88 <li>an <code><a href="http://en.wikipedia.org/wiki/alias (command)" target="_blank">alias</a></code> for
89 &lang;<i>path</i>&rang;<span style="font-family:sans-serif">adhocfilelist.sh</span>.
90 </li>
91 </ul>
92 <dt><strong>&lang;<i>options</i>&rang;<a name="opts"></a></strong><dd>
93
94 Some options &ldquo;switch into <strong><span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> mode</strong>&rdquo;,
95 affecting the interpretation of <strong>&lang;<i>files</i>&rang;</strong>, marked by &ldquo;<strong>(f)</strong>&rdquo;.
96 Their description may be inaccurate here,
97 understanding the details may require some knowledge of <span style="font-family:sans-serif">find</span>
98 (see &ldquo;<a href="#back">background</a>&rdquo; below).
99 Some options have one parameter, some have none.
100 <dl>
101 <dt><strong><code>-0</code></strong><dd> <strong>(f)</strong>
102 List files modified &ldquo;<strong>today</strong>&rdquo; only (unless &hellip;)
103 <dt><strong><code>-a</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong><dd> <strong>(f)</strong>
104 List files modified &lang;<i>integer</i>&rang; days <strong>ago</strong> only
105 (unless &lang;<i>integer</i>&rang; starts with &ldquo;<code>-</code>&rdquo; or &ldquo;<code>+</code>&rdquo; &hellip;)
106 <dt><strong><code>-c</code></strong><dd> <strong>(f)</strong>
107 Compare date according to <code>\Provides...</code> content with modification
108 date using <a href="http://www.ctan.org/pkg/filedate" target="_blank"><span style="font-family:sans-serif">filedate</span></a> additionally.
109 <p>
110 <span style="color:red"><acronym>TODO</acronym></span>: The restriction to <span style="font-family:sans-serif">find</span> (v0.7) is temporary, removing it is
111 straightforward, but I may have to postpone this for a while.
112 <dt><strong><code>-f</code></strong><dd> <strong>(f)</strong>
113 Add &lang;<i>files</i>&rang; to other <strong><span style="font-family:sans-serif">find</span></strong> criteria,
114 <strong>replacing</strong> internal default settings
115 (as opposed to <code>-g</code>).
116 For allowing certain file name extensions such as <code>.tex</code>,
117 the star must be escaped and &lang;<i>files</i>&rang; best
118 has outer single quotes, such as
119 <blockquote>
120
121 <code>'-L ( -name <code>\*</code>.tex -o -name <code>\*</code>.sty )'</code>
122
123
124 </blockquote>
125 <dt><strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong><dd> <strong>(f)</strong>
126 Add content of the <strong>file</strong> &lang;<i>find-file</i>&rang; to other <strong><span style="font-family:sans-serif">find</span></strong> criteria.
127 As compared with <code>-f</code>, stars must be escaped,
128 while other quoting seems not to be needed in &lang;<i>files</i>&rang;.
129 <dt><strong><code>-g</code></strong><dd> <strong>(f)</strong>
130 Add &lang;<i>files</i>&rang; to other <strong><span style="font-family:sans-serif">find</span></strong> criteria,
131 among which some hopefully &ldquo;<strong>generally useful</strong>&rdquo;
132 are added from within <span style="font-family:sans-serif">adhocfilelist.sh</span>.
133 As to quoting/escaping in &lang;<i>files</i>&rang;,
134 this is as with <code>-f</code>.
135 <dt><strong><code>-h</code></strong><dd>
136 Display an overview (brief version of present one, &ldquo;<strong>help</strong>&rdquo;),
137 and ignore everything else of the command line.
138 <dt><strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong><dd>
139 Prepend (&ldquo;<strong>input</strong>&rdquo;) contents of the file &lang;<i>tex-file</i>&rang;
140 to the temporary <code>.tex</code> file that <span style="font-family:sans-serif">adhocfilelist.sh</span>
141 generates internally&thinsp;&mdash;&thinsp;to get more individual settings
142 than <span style="font-family:sans-serif">adhocfilelist.sh</span>&rsquo;s internal defaults
143 (which are <strong>replaced</strong> by the content of &lang;<i>tex-file</i>&rang;)
144 and than the options <code>-l</code> and <code>-n</code> provide.
145 <dt><strong><code>-l</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong><dd>
146 Format list by the <strong><a href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span style="font-family:sans-serif">longnamefilelist</span></a></strong> package
147 where &lang;<i>integer</i>&rang; is the maximum length of base
148 <a href="http://en.wikipedia.org/wiki/filename" target="_blank">filename</a>s in the list (about as &hellip;)
149 <dt><strong><code>-n</code>&nbsp;<code>&lang;<i>filename</i>&rang;</code></strong><dd>
150 Format list by the <strong><a href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span style="font-family:sans-serif">nicefilelist</span></a></strong> package
151 where &lang;<i>filename</i>&rang; is the longest base <a href="http://en.wikipedia.org/wiki/filename" target="_blank">filename</a> (or a template).
152
153 If base filenames do <em>not</em> have more than eight characters,
154 you can use &ldquo;<strong><code>-n&nbsp;.</code></strong>&rdquo; as a shorthand for
155 &ldquo;<code>-n</code>&nbsp;<code>&lang;<i>filename</i>&rang;</code>&rdquo; with a &lang;<i>filename</i>&rang; of eight characters.
156 <dt><strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong><dd>
157 Save the displayed file info list (&ldquo;<strong>output</strong>&rdquo;)
158 as plain text file &lang;<i>txt-file</i>&rang; also.
159 <dt><strong><code>-x</code></strong><dd>
160 Use <code>xelatex</code> rather than <code>latex</code> (v0.7).&thinsp;&mdash;&thinsp;The
161 idea for this has been that the script should provide
162 &ldquo;date consistency&rdquo; checks (<strong>option&nbsp;<code>-c</code></strong>)
163 &ldquo;even with <a href="http://www.ctan.org/pkg/xetex" target="_blank"><span style="font-family:sans-serif">XeTeX</span></a> where <code>\pdffilemoddate</code> is not available.&rdquo; However, the script has used <code>latex</code>
164 before v0.7 which will run <a href="http://www.ctan.org/pkg/pdftex" target="_blank"><span style="font-family:sans-serif">pdfTeX</span></a> usually,
165 even when the user prefers <em>typesetting</em> with XeTeX,
166 and anyway it does not rely on <code>\pdffilemoddate</code>.
167 The real problem with <a href="http://www.ctan.org/pkg/filedate" target="_blank"><span style="font-family:sans-serif">filedate</span></a> and XeTeX is that
168 a reliable consistency check does not work
169 <em>while typesetting with XeTeX</em>. But <span style="font-family:sans-serif">filedate</span> can be
170 used for &ldquo;TeX scripts&rdquo; too, i.e., <em>without</em> typesetting,
171 and that is what the present package does.
172 The present package does <em>not</em> provide consistency checks
173 <em>while typesetting with XeTeX</em>.
174 It should not be make a difference whether the &ldquo;TeX script&rdquo;
175 that <span style="font-family:sans-serif">adhocfilelist</span> generates is run with XeTeX or with pdfTeX.
176 So the only &ldquo;special XeTeX support&rdquo; from here probably
177 will be the present <strong><code>-x</code></strong> in case <code>latex</code>
178 <em>does not work</em>, maybe because pdfTeX or anything implementing
179 the <code>latex</code> command is missing on the user&rsquo;s (unusual) installation.
180
181 </dl>
182 Options can <em>not</em> be &ldquo;contracted&rdquo; like &ldquo;<code>-0f</code>&rdquo;
183 (too difficult with processing [parts of] <span style="font-family:sans-serif">find</span>
184 expressions&thinsp;&mdash;&thinsp;<code>-name</code> &hellip;).
185 <dt><strong>&lang;<i>files</i>&rang;<a name="files"></a></strong><dd>
186 Whenever an option &ldquo;switches into <span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> mode&rdquo;,
187 &lang;<i>files</i>&rang; is interpreted as part of a command line for the
188 <span style="font-family:sans-serif">find</span> utility. Otherwise, &lang;<i>files</i>&rang; is expected to be a
189 comma-separated list of filenames (for LaTeX source files),
190 whose extension <code>.tex</code> (if so) may be omitted&thinsp;&mdash;&thinsp;unless <code>-h</code>&nbsp;&hellip;
191
192 </dl>
193
194 <h2><a name="required"></a>Requirements<a href="#required">.</a></h2>
195 <dl>
196 <dt><strong>System</strong><dd>
197 The package will work on a <a href="http://en.wikipedia.org/wiki/Unix-like" target="_blank">Unix-like</a> system only,
198 but I am not expert enough to judge what additional restrictions hold.
199 As I could not make work everything that should work according to
200 documentation, I expect the other way round that what works on
201 my installation may not work at other Unix-like installations.
202 If something doesn&rsquo;t work at your installation, please tell me via
203 <a href="http://contact-ednotes.sty.de.vu" target="_blank"><code>contact-ednotes.sty.de.vu</code></a>.
204 <p>
205 Actually the package was developed with the <a href="http://en.wikipedia.org/wiki/GNU bash" target="_blank">GNU bash</a>
206 shell and the
207 <a href="http://en.wikipedia.org/wiki/GNU Find Utilities" target="_blank"><abbr>GNU</abbr> <span style="font-family:sans-serif">find</span> utility</a> on
208 <a href="http://en.wikipedia.org/wiki/Ubuntu (operating system)" target="_blank">Ubuntu</a>&nbsp;10.04.
209 <p>
210 My impression is in fact
211 (looking at <a href="http://en.wikipedia.org/wiki/The Open Group" target="_blank">The Open Group</a>&rsquo;s
212 <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html" target="_blank">man page</a>
213 for <span style="font-family:sans-serif">find</span>)
214 that in order to use the <strong><span style="font-family:sans-serif">find</span></strong> options
215 <strong><code>-0</code></strong>, <strong><code>-a</code></strong>, <strong><code>-f</code></strong>, <strong><code>-F</code></strong>,
216 and <strong><code>-g</code></strong>, the <strong><abbr>GNU</abbr></strong> version of <span style="font-family:sans-serif">find</span> is required,
217 because action <strong>-printf</strong> is used and essential (difficult without).
218 <dt><strong>LaTeX</strong><dd>
219 The package requires that the <a href="http://www.ctan.org/pkg/fileinfo" target="_blank"><span style="font-family:sans-serif">fileinfo</span></a> bundle is installed.
220 In order to use the <strong><code>-l</code></strong> option,
221 <a href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span style="font-family:sans-serif">longnamefilelist</span></a> must be installed additionally.
222 In order to use the <strong><code>-n</code></strong> option,
223 <a href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span style="font-family:sans-serif">nicefilelist</span></a> must be installed additionally.
224 In order to use the <strong><code>-c</code></strong> option,
225 <a href="http://www.ctan.org/pkg/filedate" target="_blank"><span style="font-family:sans-serif">filedate</span></a> must be installed additionally.
226
227 </dl>
228
229 <h2><a name="install"></a>Installing<a href="#install">.</a></h2>
230 No more advice than implied by the section on &ldquo;<a href="#call">&lang;<i>call</i>&rang;</a>&rdquo;
231 can be given right now.
232
233 <h2><a name="related"></a>Related packages<a href="#related">.</a></h2>
234 The file
235 <a href="http://mirror.ctan.org/info/latexfileinfo-pkgs/latexfileinfo_pkgs.htm" target="_blank"><span style="font-family:sans-serif">latexfileinfo_pkgs.htm</span></a>
236 describes related packages available on
237
238 <abbr><a href="http://en.wikipedia.org/wiki/CTAN" target="_blank">CTAN</a></abbr>
239 in some detail.
240 The most obvious ones have been mentioned above already.
241
242 <p>
243 The <a href="#back">next section</a> indicates details that may be
244 improve understanding the LaTeX-related command line options
245 <code>-i</code>, <code>-l</code>, and <code>-n</code>.
246
247 <h2><a name="back"></a>Background<a href="#back">.</a></h2>
248 For understanding the options <strong><code>-0</code></strong>, <strong><code>-a</code></strong>,
249 <strong><code>-f</code></strong>, <strong><code>-F</code></strong>, and <strong><code>-g</code></strong>,
250 knowing something about the <span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> utility
251 and the present <a href="#back-find">interface</a> to it may be helpful.
252 The options <strong><code>-i</code></strong>, <strong><code>-l</code></strong>, <strong><code>-n</code></strong>,
253 and <strong><code>-o</code></strong> refer to the <a href="http://www.ctan.org/pkg/myfilist" target="_blank"><span style="font-family:sans-serif">myfilist</span></a> package
254 and its enhancements by the packages <a href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span style="font-family:sans-serif">longnamefilelist</span></a>
255 and <a href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span style="font-family:sans-serif">nicefilelist</span></a>, and it may be helpful to know
256 what a &ldquo;<a href="#my-script"><span style="font-family:sans-serif">myfilist</span> script</a>&rdquo; is.
257 <dl>
258 <dt><strong><span style="font-family:sans-serif">find</span><a name="back-find"></a></strong><dd>
259 We are describing the <strong>interface</strong> to <span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span>.
260 To learn about the contents of a <span style="font-family:sans-serif">find</span> command line,
261 the <a href="http://en.wikipedia.org/wiki/find" target="_blank">Wikipedia article</a> may be a good start,
262 next enter &ldquo;<code>man find</code>&rdquo; in the terminal, finally see the
263 <a href="http://gnu.org/software/findutils/manual/find.html" target="_blank"><abbr>GNU</abbr> manual</a>.
264 <p>
265 <span style="font-family:sans-serif">adhocfilelist.sh</span> forms the following <span style="font-family:sans-serif">find</span> command line
266 in order to get a comma-separated list of files:
267 <blockquote>
268 <code>find</code>
269 <a href="#back-f-prefix"><code>&lang;<i>prefix</i>&rang;</code></a>
270 <a href="#back-f-files"><code>&lang;<i>files</i>&rang;</code></a>
271 <a href="#back-f-day"><code>&lang;<i>day</i>&rang;</code></a>
272 <code>-printf ,%f</code>
273
274 </blockquote>
275 These parts are as follows:
276 <dl>
277 <dt><strong>&lang;<i>prefix</i>&rang;<a name="back-f-prefix"></a></strong><dd>
278 is
279 <blockquote>
280 <code>-L -maxdepth 1 ( -name <code>\*</code>.tex -o </code><code>&lang;<i>more</i>&rang;</code><code> )</code>
281
282
283 </blockquote>
284 where &lang;<i>more</i>&rang; in addition to files with extension <code>.tex</code> allows
285 those with extensions <code>.sty</code>, <code>.cfg</code>, <code>.cls</code>, <code>.dtx</code>,
286 <code>.def</code>, and <code>.fd</code>&thinsp;&mdash;&thinsp;<strong>unless</strong> with <strong>options</strong>
287 <dl>
288 <dt><strong><code>-f</code></strong><dd>
289 where &lang;<i>prefix</i>&rang; is empty
290 <dt><strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong><dd>
291 where &lang;<i>prefix</i>&rang; is the content of the file &lang;<i>find-file</i>&rang;.
292
293 </dl>
294 Option <strong><code>-g</code></strong> is not required with options
295 <strong><code>-0</code></strong> and <strong>-a</strong> that switch into &ldquo;<strong><span style="font-family:sans-serif">find</span> mode</strong>&rdquo;
296 too without deleting &lang;<i>prefix</i>&rang;, it is just a way to switch
297 into <span style="font-family:sans-serif">find</span> mode otherwise without deleting &lang;<i>prefix</i>&rang;.
298 <dt><strong>&lang;<i>files</i>&rang;<a name="back-f-files"></a></strong><dd>
299 is as in the <a href="#files">overview</a>.
300 <dt><strong>&lang;<i>day</i>&rang;<a name="back-f-day"></a></strong><dd>
301 is empty, unless <strong><code>-0</code></strong> sets it to
302 <blockquote>
303 <code>-daystart&nbsp;-mtime 0</code>
304
305 </blockquote>
306 or <strong><code>-a</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong> sets it to
307 <blockquote>
308 <code>-daystart&nbsp;-mtime&nbsp;</code><code>&lang;<i>integer</i>&rang;</code>
309
310 </blockquote>
311 It follows that
312 <ul>
313 </li>
314 <li><strong><code>-0</code></strong> has the same effect as
315 (is just a shorthand for) <strong><code>-a&nbsp;0</code></strong>
316 </li>
317 <li>if &lang;<i>integer</i>&rang; is &ldquo;<code>-&lang;<i>digits</i>&rang;</code>&rdquo;,
318 files modified <em>since</em> &lang;<i>digits</i>&rang; days ago
319 are allowed
320 </li>
321 </ul>
322 &mdash;cf.&nbsp;<abbr>GNU</abbr> documentation on
323 <a href="http://gnu.org/software/findutils/manual/html_node/find_html/Age-Ranges.html" target="_blank">age ranges.</a>
324 <p>
325 A <strong>tricky</strong> little thing here is that &lang;<i>day</i>&rang;
326 may be <em>expected</em> to be a <em>restriction</em>,
327 an <em>additional</em> criterion that a LaTeX source file
328 must meet to be listed. However, if &lang;<i>files</i>&rang; ends on
329 <strong><code>-o</code></strong> for &ldquo;or&rdquo;, &lang;<i>day</i>&rang; becomes an
330 &ldquo;additional possibility&rdquo; for being listed &hellip;
331 <p>
332 <span style="color:red"><acronym>TODO</acronym></span>: This is different with <strong>option <code>-c</code></strong>
333 (v0.7) whose functionality also may change soon.
334
335 </dl>
336 <dt><strong><span style="font-family:sans-serif">myfilist</span><a name="my-script"></a></strong><dd>
337 The LaTeX package <a href="http://www.ctan.org/pkg/myfilist" target="_blank"><span style="font-family:sans-serif">myfilist</span></a> provides some commands
338 to control the input of LaTeX&rsquo;s <code>\listfiles</code> so that its
339 output is not a list of files used for typesetting,
340 but a list of arbitrary files that is determined by commands
341 like
342 <blockquote>
343 <code>\ReadFileInfos</code><code>{</code><code>&lang;<i>comma-separated-list-of-filenames</i>&rang;</code><code>}</code>
344
345 </blockquote>
346 Essentially this is the command which the list of filenames that
347 was &lang;<i>files</i>&rang; or that is produced by <span style="font-family:sans-serif">find</span> is passed to.
348 The list is generated by running a <code>.tex</code> file that contains
349 these commands. Such a file has been called a
350 &ldquo;<strong><span style="font-family:sans-serif">myfilist</span> script</strong>&rdquo; here.
351 More precisely, such a script is (mostly) structured as follows:
352 <blockquote>
353 <a href="#back-load-set">&lang;<i>loading-settings</i>&rang;</a><br>
354 <a href="#back-coll-infos">&lang;<i>collecting-infos</i>&rang;</a><br>
355 <a href="#back-write">&lang;<i>writing-to-screen+file</i>&rang;</a>
356
357 </blockquote>
358 These parts are as follows:
359 <dl>
360 <dt><strong>&lang;<i>loading-settings</i>&rang;<a name="back-load-set"></a></strong><dd>
361 at least issues <code>\RequirePackage</code><code>{</code><code>&lang;<i>myfilist</i>&rang;</code><code>}</code>.
362 By default, <span style="font-family:sans-serif">adhocfilelist.sh</span> produces (roughly)
363 <blockquote>
364 <code>\RequirePackage</code><code>{myfilist}</code><code>\EmptyFileList</code>
365 <code>&lang;<i>adhoc-adjust</i>&rang;</code>
366
367 </blockquote>
368 for &lang;<i>loading-settings</i>&rang; where &lang;<i>adhoc-adjust</i>&rang;
369 adds technical details needed for use with <span style="font-family:sans-serif">adhocfilelist</span>.
370 (Final warnings are suppressed by a command <code>\NoBottomLines</code>,
371 this might be changed in the future.)
372 <p>
373 It has been a disadvantage of LaTeX&rsquo;s <code>\listfiles</code> functionality
374 that the resulting plain text file list looked good with base filenames
375 only that had up to eight characters. <a href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span style="font-family:sans-serif">longnamefilelist</span></a>
376 made up for this disadvantage, and <a href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span style="font-family:sans-serif">nicefilelist</span></a>
377 has additional refinements of aligning the list, proposed by
378 Martin <a href="http://www.ctan.org/author/muench-hm" target="_blank">M&uuml;nch</a>. To use them with
379 <span style="font-family:sans-serif">myfilist</span>, they are loaded in &lang;<i>loading-settings</i>&rang;
380 as well, and additional settings for column widths may be added there too.
381 This is what <strong>options</strong> <strong><code>-l</code></strong> and <strong><code>-n</code></strong> do.
382 Besides in their own <abbr>PDF</abbr> documentation (that you find by following the
383 links), the packages are also briefly described in that file
384 <a href="http://mirror.ctan.org/info/latexfileinfo-pkgs/latexfileinfo_pkgs.htm" target="_blank"><span style="font-family:sans-serif">latexfileinfo_pkgs.htm</span></a>
385 to be read by a web browser.
386 <p>
387 However, more refined settings may be needed that cannot
388 be controlled by <span style="font-family:sans-serif">adhocfilelist</span>&rsquo;s interface so far.
389 The <strong>option</strong> <strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong>
390 has the effect that &lang;<i>loading-settings</i>&rang; becomes
391 <blockquote>
392 &lang;<i>tex-file-content</i>&rang;
393 &lang;<i>adhoc-adjust</i>&rang;
394
395 </blockquote>
396 where &lang;<i>tex-file-content</i>&rang; is the content of the
397 (<code>.tex</code> file) &lang;<i>tex-file</i>&rang; (before <code>\endinput</code>).
398 <dt><strong>&lang;<i>collecting-infos</i>&rang;<a name="back-coll-infos"></a></strong><dd>
399 essentially is that
400 <blockquote>
401 <code>\ReadFileInfos</code><code>{</code><code>&lang;<i>comma-separated-list-of-filenames</i>&rang;</code><code>}</code>
402
403 </blockquote>
404 mentioned above.
405 <dt><strong>&lang;<i>writing-to-screen+file</i>&rang;<a name="back-write"></a></strong><dd>
406 essentially is <code>\ListFileInfos</code> or
407 <blockquote>
408 <code>\ListFileInfos</code><code>[</code><code>&lang;<i>txt-file</i>&rang;</code><code>]</code>
409
410 </blockquote>
411 With <span style="font-family:sans-serif">adhocfilelist</span>, that &ldquo;<code>[</code><code>&lang;<i>txt-file</i>&rang;</code><code>]</code>&rdquo;
412 is inserted on <strong>option</strong> <strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong>.
413
414 </dl>
415 However, <span style="font-family:sans-serif">myfilist</span> has been extended at the occasion
416 of preparing <span style="font-family:sans-serif">adhocfilelist</span> so that the sections
417 &lang;<i>collecting-infos</i>&rang; and &lang;<i>writing-to-screen+file</i>&rang;
418 may &ldquo;collapse&rdquo; into a single command starting with
419 <code>\ReadListFileInfos</code>.
420
421 </dl>
422
423 <h2><a name="custom"></a>General customization<a href="#custom">.</a></h2>
424 In general, options <strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong> and
425 <strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong> will be needed
426 to deal with certain directories &lang;<i>dir</i>&rang;.
427 Two ways come to my mind how to simplify this situation.
428 <ol>
429 </li>
430 <li>&lang;<i>find-file</i>&rang; and &lang;<i>tex-file</i>&rang; may be
431 in the same directory &lang;<i>dir</i>&rang;, and the latter may es well
432 contain an executable (<code><a href="http://en.wikipedia.org/wiki/chmod" target="_blank">chmod</a></code>)
433 script file &lang;<i>script-file</i>&rang;
434 with the following content:
435 <blockquote>
436 <a href="#call"><code>&lang;<i>call</i>&rang;</code></a>
437 <code>-F&nbsp;</code><code>&lang;<i>find-file</i>&rang;</code>
438 <code>-i&nbsp;</code><code>&lang;<i>tex-file</i>&rang;</code>
439 <code>&lang;<i>more</i>&rang;</code>
440 <code>$@</code>
441
442 </blockquote>
443 Here &lang;<i>call</i>&rang; is as in the <a href="#call">overview</a>,
444 and &lang;<i>more</i>&rang; may be empty or something else that you
445 want to have fixed, such as <strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong>.
446 <p>
447 <strong>Then</strong> you can <strong>vary</strong> additional options/parameters
448 &lang;<i>add</i>&rang; by
449 <blockquote>
450 <code>./</code><code>&lang;<i>script-file</i>&rang;</code> <code>&lang;<i>add</i>&rang;</code>
451
452 </blockquote>
453 </li>
454 <li>If you have <strong>several directories</strong> &lang;<i>dir</i>&rang; as before
455 of a certain &ldquo;type&rdquo;,
456 such that they can <strong>share</strong> the settings in
457 &lang;<i>find-file</i>&rang; and &lang;<i>tex-file</i>&rang;,
458 you can place the latter in some separate (&ldquo;central&rdquo;)
459 directory &lang;<i>center</i>&rang; and define an <code><a href="http://en.wikipedia.org/wiki/alias" target="_blank">alias</a></code>
460 as follows:
461 <blockquote>
462
463 <code>alias&nbsp;</code><code>&lang;<i>name</i>&rang;</code><code>='</code><a href="#call"><code>&lang;<i>call</i>&rang;</code></a>
464 <code>-F&nbsp;</code><code>&lang;<i>center</i>&rang;</code><code>/</code><code>&lang;<i>find-file</i>&rang;</code>
465 <code>-i&nbsp;</code><code>&lang;<i>center</i>&rang;</code><code>/</code><code>&lang;<i>tex-file</i>&rang;</code>
466 <code>&lang;<i>more</i>&rang;</code><code>'</code>
467
468 </blockquote>
469 (Note that there is no &ldquo;<code>$@</code>&rdquo;.
470 &ldquo;<code>&lang;<i>dir</i>&rang;</code><code>/</code><code>&lang;<i>tex-file</i>&rang;</code>&rdquo; could be replaced by
471 mere &ldquo;<code>&lang;<i>tex-file</i>&rang;</code>&rdquo; if that &lang;<i>tex-file</i>&rang;
472 is installed like a TeX&nbsp;package.)
473 <p>
474 <strong>Then</strong> you can <strong>vary</strong> additional options/parameters
475 &lang;<i>add</i>&rang; by
476 <blockquote>
477 <code>&lang;<i>name</i>&rang;</code> <code>&lang;<i>add</i>&rang;</code>
478
479 </blockquote>
480 </li>
481 </ol>
482
483 <h2><a name="idea"></a>The idea/motivation; acknowledgements<a href="#idea">.</a></h2>
484 One day (most probably 2012-09-27),
485 I wanted to check the <code>\ProvideFile</code> contents of <em>two</em>
486 files I knew I had edited that day.
487 On 2012-09-26, I had thought about simplifying <a href="http://www.ctan.org/pkg/typeoutfileinfo" target="_blank"><span style="font-family:sans-serif">typeoutfileinfo</span></a>
488 by using a single command line without any piping.
489 I realized that LaTeX&nbsp;s <code>\typeout</code> could be replaced by
490 <code>\ReadFileInfos</code> from <a href="http://www.ctan.org/pkg/myfilist" target="_blank"><span style="font-family:sans-serif">myfilist</span></a>.
491 Therefore &ldquo;<a href="http://en.wikipedia.org/wiki/ad hoc" target="_blank">ad hoc</a>&rdquo;.
492 <p>
493 Maybe the same day later,
494 I realized that I could no longer remember which files I changed that day.
495 In July I had discovered <code>$(find ...)</code>. Now I thought that this
496 could be used here. &ldquo;Ad hoc&rdquo; is less appropriate here, and first I thought
497 that there will be different script files for explicitly specified files
498 than for applying <span style="font-family:sans-serif">find</span>.
499 <p>
500 Only then I learnt real shell programming by googling, kind of chance,
501 and most helpfully from Chapter&nbsp;3 of J&uuml;rgen Wolfs
502 <a href="http://openbook.galileocomputing.de/shell_programmierung" target="_blank">OpenBook</a>
503 from <a href="http://de.wikipedia.org/wiki/Galileo Press" target="_blank">Galileo Press</a>
504 (<code><a href="http://en.wikipedia.org/wiki/getopts" target="_blank">getopts</a></code>&thinsp;&mdash;&thinsp;bad here, however)
505 and Prof. J&uuml;rgen Plates
506 <a href="http://netzmafia.de/skripten/unix/unix8.html" target="_blank">lecture notes</a>
507 (&ldquo;Optionen ermitteln&rdquo;&thinsp;&mdash;&thinsp;&ldquo;by hand&rdquo;).
508 <p>
509 Then quoting/escaping for filename extensions with <span style="font-family:sans-serif"><a href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> became difficult &hellip;
510 Quotation marks and &ldquo;positional parameters&rdquo; with the shell are very
511 difficult/<strong>painful</strong>&thinsp;&mdash;&thinsp;TeX is more straightforward &hellip;
512 On the other hand it is nice that the entire command line with <em>all</em> the
513 &ldquo;parameters&rdquo; is gobbled.
514
515 <hr>
516 <p align="right"><i>Last&nbsp;revised&nbsp;2013-01-04 &copy;&nbsp;<a href="http://www.webdesign-bu.de/uwe_lueck/contact.html" target="_blank">Uwe L&uuml;ck</a><br> (using <a href="http://www.ctan.org/pkg/morehype" target="_blank"><span style="font-family:sans-serif">blog.sty</span></a>)<br> License: <a href="http://www.latex-project.org/lppl/" target="_blank">LPPL&nbsp;1.3c</a> or later, author-maintained.</i></p>
517 <p align="right"><a href="#top-of-page">[<i>&rarr;&nbsp;top&nbsp;of&nbsp;page</i>&nbsp;]</a></p>
518
519 <table width="" height="240" border="0" cellpadding="0" cellspacing="0"><tbody>
520 <!-- HVspace -->
521 <tr valign="top"><td></td> </tr>
522
523 </tbody></table>
524
525 </body></html>
526