summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/adhocfilelist/adhocfilelist.htm
blob: 28339e62b055adc7a43df730a642db0afd9d3187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<!DOCTYPE html>
<!-- generated from

         adhocfilelist.tex, 2012/11/19 documenting adhocfilelist (UL),

     with blog.sty, 2013-01-04 --> 
<html><head>  <meta  http-equiv="content-type" content="text/html; ISO-8859-1"> 
  <meta  name="robots" content="index,follow,noarchive">
  <title>List LaTeX file infos according to command line</title> 

</head><body>
<a  name="top-of-page"></a> 
 
 
 

<h1><code>adhocfilelist</code> &mdash;
<table  width=""  height="6"  border="0"  cellpadding="0"  cellspacing="0"><tbody>
 <!-- HVspace -->
  <tr  valign="top"><td></td>  </tr>

</tbody></table>
 Listing LaTeX Source File Infos<br> According to Command Line</h1> 

<p> 
<small> 
[&#8239;<a  href="#abstract">abstract</a>&nbsp;|
<a  href="#over">overview</a>&nbsp;|
<a  href="#required">requirements</a>&nbsp;|
<a  href="#install">installing</a>&nbsp;|
<a  href="#related">related</a>&nbsp;|
<a  href="#back">background</a>&nbsp;|
<a  href="#custom">customize</a>&nbsp;|
<a  href="#idea">idea/thanks</a>&#8239;]&emsp;
[&#8239;<i><a  href="adhocfilelist.htm">reload</a></i>&#8239;] 

</small> 

<h2><a  name="abstract"></a>Abstract<a  href="#abstract">.</a></h2> 
<span  style="font-family:sans-serif">adhocfilelist.sh</span> is a shell script with command line options 
and parameters that displays &lang;<i>info</i>&rang; for files &lang;<i>file</i>&rang; 
on screen that (i)&nbsp;are indicated on the command line and 
(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>, 
<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>, 
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>. 
There is one line for each file, formatted about as with LaTeX&rsquo;s 
<code>\listfiles</code>. This formatting can be varied, and the output may 
additionally be saved in a plain text file. The files &lang;<i>file</i>&rang; 
are either (a)&nbsp;listed explicitly, separated by commas, or 
(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. 
For the latter, <span  style="font-family:sans-serif">adhocfilelist</span> provides a somewhat simplified 
interface, especially for restricting the list of files 
to those that have been modified &ldquo;today&rdquo; or a few days ago. 
So you/I can check whether version info was updated correctly, 
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; 
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 unavailable). 
<p> 
The package may thus be considered an extension of the 
<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>) 
and <a  href="http://www.ctan.org/pkg/typeoutfileinfo" target="_blank"><span  style="font-family:sans-serif">typeoutfileinfo</span></a> packages 
that display &lang;<i>info</i>&rang; for a <em>single</em> file &lang;<i>file</i>&rang;. 
Moreover, it is a somewhat simplified interface to the packages 
<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>, 
<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>. 

<h2><a  name="over"></a>Overview of command line contents<a  href="#over">.</a></h2> 
The general structure of a command line using <span  style="font-family:sans-serif">adhocfilelist</span> is 
<blockquote> 
<a  href="#call">&lang;<i>call</i>&rang;</a> 
<a  href="#opts">&lang;<i>options</i>&rang;</a> 
<a  href="#files">&lang;<i>files</i>&rang;</a> 

</blockquote> 
The three parts are as follows: 
<dl> 
  <dt><strong>&lang;<i>call</i>&rang;<a  name="call"></a></strong><dd> 
This is either 
<ul> 
  </li>
  <li>&lang;<i>path</i>&rang;<span  style="font-family:sans-serif">adhocfilelist.sh</span> 
where &lang;<i>path</i>&rang; is &ldquo;./&rdquo; or something, 
depending on where you place the file <span  style="font-family:sans-serif">adhocfilelist.sh</span>, 
or on your use of <a  href="http://en.wikipedia.org/wiki/symbolic link" target="_blank">symbolic link</a>s, 
the environment variable <code><a  href="http://en.wikipedia.org/wiki/PATH (variable)" target="_blank">PATH</a></code>, 
or 
  </li>
  <li>an <code><a  href="http://en.wikipedia.org/wiki/alias (command)" target="_blank">alias</a></code> for 
&lang;<i>path</i>&rang;<span  style="font-family:sans-serif">adhocfilelist.sh</span>. 
</li>
</ul> 
  <dt><strong>&lang;<i>options</i>&rang;<a  name="opts"></a></strong><dd> 
 
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;, 
affecting the interpretation of <strong>&lang;<i>files</i>&rang;</strong>, marked by &ldquo;<strong>(f)</strong>&rdquo;. 
Their description may be inaccurate here, 
understanding the details may require some knowledge of <span  style="font-family:sans-serif">find</span> 
(see &ldquo;<a  href="#back">background</a>&rdquo; below). 
Some options have one parameter, some have none. 
<dl> 
  <dt><strong><code>-0</code></strong><dd> <strong>(f)</strong> 
List files modified &ldquo;<strong>today</strong>&rdquo; only (unless &hellip;) 
  <dt><strong><code>-a</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong><dd> <strong>(f)</strong> 
List files modified &lang;<i>integer</i>&rang; days <strong>ago</strong> only 
(unless &lang;<i>integer</i>&rang; starts with &ldquo;<code>-</code>&rdquo; or &ldquo;<code>+</code>&rdquo; &hellip;) 
  <dt><strong><code>-c</code></strong><dd> <strong>(f)</strong> 
Compare date according to <code>\Provides...</code> content with modification 
date using <a  href="http://www.ctan.org/pkg/filedate" target="_blank"><span  style="font-family:sans-serif">filedate</span></a> additionally. 
<p> 
<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 
straightforward, but I may have to postpone this for a while. 
  <dt><strong><code>-f</code></strong><dd> <strong>(f)</strong> 
Add &lang;<i>files</i>&rang; to other <strong><span  style="font-family:sans-serif">find</span></strong> criteria, 
<strong>replacing</strong> internal default settings 
(as opposed to <code>-g</code>). 
For allowing certain file name extensions such as <code>.tex</code>, 
the star must be escaped and &lang;<i>files</i>&rang; best 
has outer single quotes, such as 
<blockquote> 
 
<code>'-L ( -name <code>\*</code>.tex -o -name <code>\*</code>.sty )'</code> 


</blockquote> 
  <dt><strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong><dd> <strong>(f)</strong> 
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. 
As compared with <code>-f</code>, stars must be escaped, 
while other quoting seems not to be needed in &lang;<i>files</i>&rang;. 
  <dt><strong><code>-g</code></strong><dd> <strong>(f)</strong> 
Add &lang;<i>files</i>&rang; to other <strong><span  style="font-family:sans-serif">find</span></strong> criteria, 
among which some hopefully &ldquo;<strong>generally useful</strong>&rdquo; 
are added from within <span  style="font-family:sans-serif">adhocfilelist.sh</span>. 
As to quoting/escaping in &lang;<i>files</i>&rang;, 
this is as with <code>-f</code>. 
  <dt><strong><code>-h</code></strong><dd> 
Display an overview (brief version of present one, &ldquo;<strong>help</strong>&rdquo;), 
and ignore everything else of the command line. 
  <dt><strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong><dd> 
Prepend (&ldquo;<strong>input</strong>&rdquo;) contents of the file &lang;<i>tex-file</i>&rang; 
to the temporary <code>.tex</code> file that <span  style="font-family:sans-serif">adhocfilelist.sh</span> 
generates internally&thinsp;&mdash;&thinsp;to get more individual settings 
than <span  style="font-family:sans-serif">adhocfilelist.sh</span>&rsquo;s internal defaults 
(which are <strong>replaced</strong> by the content of &lang;<i>tex-file</i>&rang;) 
and than the options <code>-l</code> and <code>-n</code> provide. 
  <dt><strong><code>-l</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong><dd> 
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 
where &lang;<i>integer</i>&rang; is the maximum length of base 
<a  href="http://en.wikipedia.org/wiki/filename" target="_blank">filename</a>s in the list (about as &hellip;) 
  <dt><strong><code>-n</code>&nbsp;<code>&lang;<i>filename</i>&rang;</code></strong><dd> 
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 
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). 

If base filenames do <em>not</em> have more than eight characters, 
you can use &ldquo;<strong><code>-n&nbsp;.</code></strong>&rdquo; as a shorthand for 
&ldquo;<code>-n</code>&nbsp;<code>&lang;<i>filename</i>&rang;</code>&rdquo; with a &lang;<i>filename</i>&rang; of eight characters. 
  <dt><strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong><dd> 
Save the displayed file info list (&ldquo;<strong>output</strong>&rdquo;) 
as plain text file &lang;<i>txt-file</i>&rang; also. 
  <dt><strong><code>-x</code></strong><dd> 
Use <code>xelatex</code> rather than <code>latex</code> (v0.7).&thinsp;&mdash;&thinsp;The 
idea for this has been that the script should provide 
&ldquo;date consistency&rdquo; checks (<strong>option&nbsp;<code>-c</code></strong>) 
&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> 
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, 
even when the user prefers <em>typesetting</em> with XeTeX, 
and anyway it does not rely on <code>\pdffilemoddate</code>. 
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 
a reliable consistency check does not work 
<em>while typesetting with XeTeX</em>. But <span  style="font-family:sans-serif">filedate</span> can be 
used for &ldquo;TeX scripts&rdquo; too, i.e., <em>without</em> typesetting, 
and that is what the present package does. 
The present package does <em>not</em> provide consistency checks 
<em>while typesetting with XeTeX</em>. 
It should not be make a difference whether the &ldquo;TeX script&rdquo; 
that <span  style="font-family:sans-serif">adhocfilelist</span> generates is run with XeTeX or with pdfTeX. 
So the only &ldquo;special XeTeX support&rdquo; from here probably 
will be the present <strong><code>-x</code></strong> in case <code>latex</code> 
<em>does not work</em>, maybe because pdfTeX or anything implementing 
the <code>latex</code> command is missing on the user&rsquo;s (unusual) installation. 

</dl> 
Options can <em>not</em> be &ldquo;contracted&rdquo; like &ldquo;<code>-0f</code>&rdquo; 
(too difficult with processing [parts of] <span  style="font-family:sans-serif">find</span> 
expressions&thinsp;&mdash;&thinsp;<code>-name</code> &hellip;). 
  <dt><strong>&lang;<i>files</i>&rang;<a  name="files"></a></strong><dd> 
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;, 
&lang;<i>files</i>&rang; is interpreted as part of a command line for the 
<span  style="font-family:sans-serif">find</span> utility. Otherwise, &lang;<i>files</i>&rang; is expected to be a 
comma-separated list of filenames (for LaTeX source files), 
whose extension <code>.tex</code> (if so) may be omitted&thinsp;&mdash;&thinsp;unless <code>-h</code>&nbsp;&hellip; 

</dl> 

<h2><a  name="required"></a>Requirements<a  href="#required">.</a></h2> 
<dl> 
  <dt><strong>System</strong><dd> 
The package will work on a <a  href="http://en.wikipedia.org/wiki/Unix-like" target="_blank">Unix-like</a> system only, 
but I am not expert enough to judge what additional restrictions hold. 
As I could not make work everything that should work according to 
documentation, I expect the other way round that what works on 
my installation may not work at other Unix-like installations. 
If something doesn&rsquo;t work at your installation, please tell me via 
<a  href="http://contact-ednotes.sty.de.vu" target="_blank"><code>contact-ednotes.sty.de.vu</code></a>. 
<p> 
Actually the package was developed with the <a  href="http://en.wikipedia.org/wiki/GNU bash" target="_blank">GNU bash</a> 
shell and the 
<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 
<a  href="http://en.wikipedia.org/wiki/Ubuntu (operating system)" target="_blank">Ubuntu</a>&nbsp;10.04. 
<p> 
My impression is in fact 
(looking at <a  href="http://en.wikipedia.org/wiki/The Open Group" target="_blank">The Open Group</a>&rsquo;s 
<a  href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html" target="_blank">man page</a> 
for <span  style="font-family:sans-serif">find</span>) 
that in order to use the <strong><span  style="font-family:sans-serif">find</span></strong> options 
<strong><code>-0</code></strong>, <strong><code>-a</code></strong>, <strong><code>-f</code></strong>, <strong><code>-F</code></strong>, 
and <strong><code>-g</code></strong>, the <strong><abbr>GNU</abbr></strong> version of <span  style="font-family:sans-serif">find</span> is required, 
because action <strong>-printf</strong> is used and essential (difficult without). 
  <dt><strong>LaTeX</strong><dd> 
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. 
In order to use the <strong><code>-l</code></strong> option, 
<a  href="http://www.ctan.org/pkg/longnamefilelist" target="_blank"><span  style="font-family:sans-serif">longnamefilelist</span></a> must be installed additionally. 
In order to use the <strong><code>-n</code></strong> option, 
<a  href="http://www.ctan.org/pkg/nicefilelist" target="_blank"><span  style="font-family:sans-serif">nicefilelist</span></a> must be installed additionally. 
In order to use the <strong><code>-c</code></strong> option, 
<a  href="http://www.ctan.org/pkg/filedate" target="_blank"><span  style="font-family:sans-serif">filedate</span></a> must be installed additionally. 

</dl> 

<h2><a  name="install"></a>Installing<a  href="#install">.</a></h2> 
No more advice than implied by the section on &ldquo;<a  href="#call">&lang;<i>call</i>&rang;</a>&rdquo; 
can be given right now. 

<h2><a  name="related"></a>Related packages<a  href="#related">.</a></h2> 
The file 
<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> 
describes related packages available on 

<abbr><a  href="http://en.wikipedia.org/wiki/CTAN" target="_blank">CTAN</a></abbr> 
in some detail. 
The most obvious ones have been mentioned above already. 

<p> 
The <a  href="#back">next section</a> indicates details that may be 
improve understanding the LaTeX-related command line options 
<code>-i</code>, <code>-l</code>, and <code>-n</code>. 

<h2><a  name="back"></a>Background<a  href="#back">.</a></h2> 
For understanding the options <strong><code>-0</code></strong>, <strong><code>-a</code></strong>, 
<strong><code>-f</code></strong>, <strong><code>-F</code></strong>, and <strong><code>-g</code></strong>, 
knowing something about the <span  style="font-family:sans-serif"><a  href="http://en.wikipedia.org/wiki/find" target="_blank">find</a></span> utility 
and the present <a  href="#back-find">interface</a> to it may be helpful. 
The options <strong><code>-i</code></strong>, <strong><code>-l</code></strong>, <strong><code>-n</code></strong>, 
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 
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> 
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 
what a &ldquo;<a  href="#my-script"><span  style="font-family:sans-serif">myfilist</span> script</a>&rdquo; is. 
<dl> 
  <dt><strong><span  style="font-family:sans-serif">find</span><a  name="back-find"></a></strong><dd> 
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>. 
To learn about the contents of a <span  style="font-family:sans-serif">find</span> command line, 
the <a  href="http://en.wikipedia.org/wiki/find" target="_blank">Wikipedia article</a> may be a good start, 
next enter &ldquo;<code>man find</code>&rdquo; in the terminal, finally see the 
<a  href="http://gnu.org/software/findutils/manual/find.html" target="_blank"><abbr>GNU</abbr> manual</a>. 
<p> 
<span  style="font-family:sans-serif">adhocfilelist.sh</span> forms the following <span  style="font-family:sans-serif">find</span> command line 
in order to get a comma-separated list of files: 
<blockquote> 
<code>find</code> 
<a  href="#back-f-prefix"><code>&lang;<i>prefix</i>&rang;</code></a> 
<a  href="#back-f-files"><code>&lang;<i>files</i>&rang;</code></a> 
<a  href="#back-f-day"><code>&lang;<i>day</i>&rang;</code></a> 
<code>-printf ,%f</code> 

</blockquote> 
These parts are as follows: 
<dl> 
  <dt><strong>&lang;<i>prefix</i>&rang;<a  name="back-f-prefix"></a></strong><dd> 
is 
<blockquote> 
<code>-L -maxdepth 1 ( -name <code>\*</code>.tex -o </code><code>&lang;<i>more</i>&rang;</code><code> )</code> 


</blockquote> 
where &lang;<i>more</i>&rang; in addition to files with extension <code>.tex</code> allows 
those with extensions <code>.sty</code>, <code>.cfg</code>, <code>.cls</code>, <code>.dtx</code>, 
<code>.def</code>, and <code>.fd</code>&thinsp;&mdash;&thinsp;<strong>unless</strong> with <strong>options</strong> 
<dl> 
  <dt><strong><code>-f</code></strong><dd> 
where &lang;<i>prefix</i>&rang; is empty 
  <dt><strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong><dd> 
where &lang;<i>prefix</i>&rang; is the content of the file &lang;<i>find-file</i>&rang;. 

</dl> 
Option <strong><code>-g</code></strong> is not required with options 
<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; 
too without deleting &lang;<i>prefix</i>&rang;, it is just a way to switch 
into <span  style="font-family:sans-serif">find</span> mode otherwise without deleting &lang;<i>prefix</i>&rang;. 
  <dt><strong>&lang;<i>files</i>&rang;<a  name="back-f-files"></a></strong><dd> 
is as in the <a  href="#files">overview</a>. 
  <dt><strong>&lang;<i>day</i>&rang;<a  name="back-f-day"></a></strong><dd> 
is empty, unless <strong><code>-0</code></strong> sets it to 
<blockquote> 
<code>-daystart&nbsp;-mtime 0</code> 

</blockquote> 
or <strong><code>-a</code>&nbsp;<code>&lang;<i>integer</i>&rang;</code></strong> sets it to 
<blockquote> 
<code>-daystart&nbsp;-mtime&nbsp;</code><code>&lang;<i>integer</i>&rang;</code> 

</blockquote> 
It follows that 
<ul> 
  </li>
  <li><strong><code>-0</code></strong> has the same effect as 
(is just a shorthand for) <strong><code>-a&nbsp;0</code></strong> 
  </li>
  <li>if &lang;<i>integer</i>&rang; is &ldquo;<code>-&lang;<i>digits</i>&rang;</code>&rdquo;, 
files modified <em>since</em> &lang;<i>digits</i>&rang; days ago 
are allowed 
</li>
</ul> 
&mdash;cf.&nbsp;<abbr>GNU</abbr> documentation on 
<a  href="http://gnu.org/software/findutils/manual/html_node/find_html/Age-Ranges.html" target="_blank">age ranges.</a> 
<p> 
A <strong>tricky</strong> little thing here is that &lang;<i>day</i>&rang; 
may be <em>expected</em> to be a <em>restriction</em>, 
an <em>additional</em> criterion that a LaTeX source file 
must meet to be listed. However, if &lang;<i>files</i>&rang; ends on 
<strong><code>-o</code></strong> for &ldquo;or&rdquo;, &lang;<i>day</i>&rang; becomes an 
&ldquo;additional possibility&rdquo; for being listed &hellip; 
<p> 
<span  style="color:red"><acronym>TODO</acronym></span>: This is different with <strong>option <code>-c</code></strong> 
(v0.7) whose functionality also may change soon. 

</dl> 
  <dt><strong><span  style="font-family:sans-serif">myfilist</span><a  name="my-script"></a></strong><dd> 
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 
to control the input of LaTeX&rsquo;s <code>\listfiles</code> so that its 
output is not a list of files used for typesetting, 
but a list of arbitrary files that is determined by commands 
like 
<blockquote> 
<code>\ReadFileInfos</code><code>{</code><code>&lang;<i>comma-separated-list-of-filenames</i>&rang;</code><code>}</code> 

</blockquote> 
Essentially this is the command which the list of filenames that 
was &lang;<i>files</i>&rang; or that is produced by <span  style="font-family:sans-serif">find</span> is passed to. 
The list is generated by running a <code>.tex</code> file that contains 
these commands. Such a file has been called a 
&ldquo;<strong><span  style="font-family:sans-serif">myfilist</span> script</strong>&rdquo; here. 
More precisely, such a script is (mostly) structured as follows: 
<blockquote> 
<a  href="#back-load-set">&lang;<i>loading-settings</i>&rang;</a><br> 
<a  href="#back-coll-infos">&lang;<i>collecting-infos</i>&rang;</a><br> 
<a  href="#back-write">&lang;<i>writing-to-screen+file</i>&rang;</a> 

</blockquote> 
These parts are as follows: 
<dl> 
  <dt><strong>&lang;<i>loading-settings</i>&rang;<a  name="back-load-set"></a></strong><dd> 
at least issues <code>\RequirePackage</code><code>{</code><code>&lang;<i>myfilist</i>&rang;</code><code>}</code>. 
By default, <span  style="font-family:sans-serif">adhocfilelist.sh</span> produces (roughly) 
<blockquote> 
<code>\RequirePackage</code><code>{myfilist}</code><code>\EmptyFileList</code> 
<code>&lang;<i>adhoc-adjust</i>&rang;</code> 

</blockquote> 
for &lang;<i>loading-settings</i>&rang; where &lang;<i>adhoc-adjust</i>&rang; 
adds technical details needed for use with <span  style="font-family:sans-serif">adhocfilelist</span>. 
(Final warnings are suppressed by a command <code>\NoBottomLines</code>, 
this might be changed in the future.) 
<p> 
It has been a disadvantage of LaTeX&rsquo;s <code>\listfiles</code> functionality 
that the resulting plain text file list looked good with base filenames 
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> 
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> 
has additional refinements of aligning the list, proposed by 
Martin <a  href="http://www.ctan.org/author/muench-hm" target="_blank">M&uuml;nch</a>. To use them with 
<span  style="font-family:sans-serif">myfilist</span>, they are loaded in &lang;<i>loading-settings</i>&rang; 
as well, and additional settings for column widths may be added there too. 
This is what <strong>options</strong> <strong><code>-l</code></strong> and <strong><code>-n</code></strong> do. 
Besides in their own <abbr>PDF</abbr> documentation (that you find by following the 
links), the packages are also briefly described in that file 
<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> 
to be read by a web browser. 
<p> 
However, more refined settings may be needed that cannot 
be controlled by <span  style="font-family:sans-serif">adhocfilelist</span>&rsquo;s interface so far. 
The <strong>option</strong> <strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong> 
has the effect that &lang;<i>loading-settings</i>&rang; becomes 
<blockquote> 
&lang;<i>tex-file-content</i>&rang; 
&lang;<i>adhoc-adjust</i>&rang; 

</blockquote> 
where &lang;<i>tex-file-content</i>&rang; is the content of the 
(<code>.tex</code> file) &lang;<i>tex-file</i>&rang; (before <code>\endinput</code>). 
  <dt><strong>&lang;<i>collecting-infos</i>&rang;<a  name="back-coll-infos"></a></strong><dd> 
essentially is that 
<blockquote> 
<code>\ReadFileInfos</code><code>{</code><code>&lang;<i>comma-separated-list-of-filenames</i>&rang;</code><code>}</code> 

</blockquote> 
mentioned above. 
  <dt><strong>&lang;<i>writing-to-screen+file</i>&rang;<a  name="back-write"></a></strong><dd> 
essentially is <code>\ListFileInfos</code> or 
<blockquote> 
<code>\ListFileInfos</code><code>[</code><code>&lang;<i>txt-file</i>&rang;</code><code>]</code> 

</blockquote> 
With <span  style="font-family:sans-serif">adhocfilelist</span>, that &ldquo;<code>[</code><code>&lang;<i>txt-file</i>&rang;</code><code>]</code>&rdquo; 
is inserted on <strong>option</strong> <strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong>. 

</dl> 
However, <span  style="font-family:sans-serif">myfilist</span> has been extended at the occasion 
of preparing <span  style="font-family:sans-serif">adhocfilelist</span> so that the sections 
&lang;<i>collecting-infos</i>&rang; and &lang;<i>writing-to-screen+file</i>&rang; 
may &ldquo;collapse&rdquo; into a single command starting with 
<code>\ReadListFileInfos</code>. 

</dl> 

<h2><a  name="custom"></a>General customization<a  href="#custom">.</a></h2> 
In general, options <strong><code>-F</code>&nbsp;<code>&lang;<i>find-file</i>&rang;</code></strong> and 
<strong><code>-i</code>&nbsp;<code>&lang;<i>tex-file</i>&rang;</code></strong> will be needed 
to deal with certain directories &lang;<i>dir</i>&rang;. 
Two ways come to my mind how to simplify this situation. 
<ol> 
  </li>
  <li>&lang;<i>find-file</i>&rang; and &lang;<i>tex-file</i>&rang; may be 
in the same directory &lang;<i>dir</i>&rang;, and the latter may es well 
contain an executable (<code><a  href="http://en.wikipedia.org/wiki/chmod" target="_blank">chmod</a></code>) 
script file &lang;<i>script-file</i>&rang; 
with the following content: 
<blockquote> 
<a  href="#call"><code>&lang;<i>call</i>&rang;</code></a> 
<code>-F&nbsp;</code><code>&lang;<i>find-file</i>&rang;</code> 
<code>-i&nbsp;</code><code>&lang;<i>tex-file</i>&rang;</code> 
<code>&lang;<i>more</i>&rang;</code> 
<code>$@</code> 

</blockquote> 
Here &lang;<i>call</i>&rang; is as in the <a  href="#call">overview</a>, 
and &lang;<i>more</i>&rang; may be empty or something else that you 
want to have fixed, such as <strong><code>-o</code>&nbsp;<code>&lang;<i>txt-file</i>&rang;</code></strong>. 
<p> 
<strong>Then</strong> you can <strong>vary</strong> additional options/parameters 
&lang;<i>add</i>&rang; by 
<blockquote> 
<code>./</code><code>&lang;<i>script-file</i>&rang;</code> <code>&lang;<i>add</i>&rang;</code> 

</blockquote> 
  </li>
  <li>If you have <strong>several directories</strong> &lang;<i>dir</i>&rang; as before 
of a certain &ldquo;type&rdquo;, 
such that they can <strong>share</strong> the settings in 
&lang;<i>find-file</i>&rang; and &lang;<i>tex-file</i>&rang;, 
you can place the latter in some separate (&ldquo;central&rdquo;) 
directory &lang;<i>center</i>&rang; and define an <code><a  href="http://en.wikipedia.org/wiki/alias" target="_blank">alias</a></code> 
as follows: 
<blockquote> 
 
<code>alias&nbsp;</code><code>&lang;<i>name</i>&rang;</code><code>='</code><a  href="#call"><code>&lang;<i>call</i>&rang;</code></a> 
<code>-F&nbsp;</code><code>&lang;<i>center</i>&rang;</code><code>/</code><code>&lang;<i>find-file</i>&rang;</code> 
<code>-i&nbsp;</code><code>&lang;<i>center</i>&rang;</code><code>/</code><code>&lang;<i>tex-file</i>&rang;</code> 
<code>&lang;<i>more</i>&rang;</code><code>'</code> 

</blockquote> 
(Note that there is no &ldquo;<code>$@</code>&rdquo;. 
&ldquo;<code>&lang;<i>dir</i>&rang;</code><code>/</code><code>&lang;<i>tex-file</i>&rang;</code>&rdquo; could be replaced by 
mere &ldquo;<code>&lang;<i>tex-file</i>&rang;</code>&rdquo; if that &lang;<i>tex-file</i>&rang; 
is installed like a TeX&nbsp;package.) 
<p> 
<strong>Then</strong> you can <strong>vary</strong> additional options/parameters 
&lang;<i>add</i>&rang; by 
<blockquote> 
<code>&lang;<i>name</i>&rang;</code> <code>&lang;<i>add</i>&rang;</code> 

</blockquote> 
</li>
</ol> 

<h2><a  name="idea"></a>The idea/motivation; acknowledgements<a  href="#idea">.</a></h2> 
One day (most probably 2012-09-27), 
I wanted to check the <code>\ProvideFile</code> contents of <em>two</em> 
files I knew I had edited that day. 
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> 
by using a single command line without any piping. 
I realized that LaTeX&nbsp;s <code>\typeout</code> could be replaced by 
<code>\ReadFileInfos</code> from <a  href="http://www.ctan.org/pkg/myfilist" target="_blank"><span  style="font-family:sans-serif">myfilist</span></a>. 
Therefore &ldquo;<a  href="http://en.wikipedia.org/wiki/ad hoc" target="_blank">ad hoc</a>&rdquo;. 
<p> 
Maybe the same day later, 
I realized that I could no longer remember which files I changed that day. 
In July I had discovered <code>$(find ...)</code>. Now I thought that this 
could be used here. &ldquo;Ad hoc&rdquo; is less appropriate here, and first I thought 
that there will be different script files for explicitly specified files 
than for applying <span  style="font-family:sans-serif">find</span>. 
<p> 
Only then I learnt real shell programming by googling, kind of chance, 
and most helpfully from Chapter&nbsp;3 of J&uuml;rgen Wolfs 
<a  href="http://openbook.galileocomputing.de/shell_programmierung" target="_blank">OpenBook</a> 
from <a  href="http://de.wikipedia.org/wiki/Galileo Press" target="_blank">Galileo Press</a> 
(<code><a  href="http://en.wikipedia.org/wiki/getopts" target="_blank">getopts</a></code>&thinsp;&mdash;&thinsp;bad here, however) 
and Prof. J&uuml;rgen Plates 
<a  href="http://netzmafia.de/skripten/unix/unix8.html" target="_blank">lecture notes</a> 
(&ldquo;Optionen ermitteln&rdquo;&thinsp;&mdash;&thinsp;&ldquo;by hand&rdquo;). 
<p> 
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; 
Quotation marks and &ldquo;positional parameters&rdquo; with the shell are very 
difficult/<strong>painful</strong>&thinsp;&mdash;&thinsp;TeX is more straightforward &hellip; 
On the other hand it is nice that the entire command line with <em>all</em> the 
&ldquo;parameters&rdquo; is gobbled. 

<hr>
<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> 
<p  align="right"><a  href="#top-of-page">[<i>&rarr;&nbsp;top&nbsp;of&nbsp;page</i>&nbsp;]</a></p>

<table  width=""  height="240"  border="0"  cellpadding="0"  cellspacing="0"><tbody>
 <!-- HVspace -->
  <tr  valign="top"><td></td>  </tr>

</tbody></table>
 
</body></html>