[ abstract | overview | requirements | installing | related | background | customize | idea/thanks ] [ reload ]
]. There is one line for each file, formatted about as with LaTeX’s
\listfiles. This formatting can be varied, and the output may additionally be saved in a plain text file. The files 〈file〉 are either (a) listed explicitly, separated by commas, or (b) they are gathered by the Unix find utility. For the latter, adhocfilelist provides a somewhat simplified interface, especially for restricting the list of files to those that have been modified “today” or a few days ago. So you/I can check whether version info was updated correctly, and it may allow filedate “consistency checks” even with XeTeX (where
The package may thus be considered an extension of the latexfileversion (Harald Harders) and typeoutfileinfo packages that display 〈info〉 for a single file 〈file〉. Moreover, it is a somewhat simplified interface to the packages myfilist, longnamefilelist, nicefilelist, and filedate.
〈call〉 〈options〉 〈files〉The three parts are as follows:
-” or “
\Provides...content with modification date using filedate additionally.
TODO: The restriction to find (v0.7) is temporary, removing it is straightforward, but I may have to postpone this for a while.
-g). For allowing certain file name extensions such as
.tex, the star must be escaped and 〈files〉 best has outer single quotes, such as
'-L ( -name
\*.tex -o -name
-f, stars must be escaped, while other quoting seems not to be needed in 〈files〉.
.texfile that adhocfilelist.sh generates internally — to get more individual settings than adhocfilelist.sh’s internal defaults (which are replaced by the content of 〈tex-file〉) and than the options
-n .” as a shorthand for “
〈filename〉” with a 〈filename〉 of eight characters.
latex(v0.7). — The idea for this has been that the script should provide “date consistency” checks (option
-c) “even with XeTeX where
\pdffilemoddateis not available.” However, the script has used
latexbefore v0.7 which will run pdfTeX usually, even when the user prefers typesetting with XeTeX, and anyway it does not rely on
\pdffilemoddate. The real problem with filedate and XeTeX is that a reliable consistency check does not work while typesetting with XeTeX. But filedate can be used for “TeX scripts” too, i.e., without typesetting, and that is what the present package does. The present package does not provide consistency checks while typesetting with XeTeX. It should not be make a difference whether the “TeX script” that adhocfilelist generates is run with XeTeX or with pdfTeX. So the only “special XeTeX support” from here probably will be the present
latexdoes not work, maybe because pdfTeX or anything implementing the
latexcommand is missing on the user’s (unusual) installation.
-0f” (too difficult with processing [parts of] find expressions —
.tex(if so) may be omitted — unless
Actually the package was developed with the GNU bash shell and the GNU find utility on Ubuntu 10.04.
My impression is in fact
(looking at The Open Group’s
that in order to use the find options
-g, the GNU version of find is required,
because action -printf is used and essential (difficult without).
-loption, longnamefilelist must be installed additionally. In order to use the
-noption, nicefilelist must be installed additionally. In order to use the
-coption, filedate must be installed additionally.
The next section indicates details that may be
improve understanding the LaTeX-related command line options
-g, knowing something about the find utility and the present interface to it may be helpful. The options
-orefer to the myfilist package and its enhancements by the packages longnamefilelist and nicefilelist, and it may be helpful to know what a “myfilist script” is.
man find” in the terminal, finally see the GNU manual.
adhocfilelist.sh forms the following find command line in order to get a comma-separated list of files:
These parts are as follows:
where 〈more〉 in addition to files with extension
-L -maxdepth 1 ( -name
.texallows those with extensions
.fd— unless with options
-gis not required with options
-0and -a that switch into “find mode” too without deleting 〈prefix〉, it is just a way to switch into find mode otherwise without deleting 〈prefix〉.
-0sets it to
-daystart -mtime 0
〈integer〉sets it to
It follows that
-0has the same effect as (is just a shorthand for)
-〈digits〉”, files modified since 〈digits〉 days ago are allowed
A tricky little thing here is that 〈day〉
may be expected to be a restriction,
an additional criterion that a LaTeX source file
must meet to be listed. However, if 〈files〉 ends on
-o for “or”, 〈day〉 becomes an
“additional possibility” for being listed …
TODO: This is different with option
(v0.7) whose functionality also may change soon.
\listfilesso that its output is not a list of files used for typesetting, but a list of arbitrary files that is determined by commands like
Essentially this is the command which the list of filenames that was 〈files〉 or that is produced by find is passed to. The list is generated by running a
.texfile that contains these commands. Such a file has been called a “myfilist script” here. More precisely, such a script is (mostly) structured as follows:
〈loading-settings〉These parts are as follows:
}. By default, adhocfilelist.sh produces (roughly)
for 〈loading-settings〉 where 〈adhoc-adjust〉 adds technical details needed for use with adhocfilelist. (Final warnings are suppressed by a command
\NoBottomLines, this might be changed in the future.)
It has been a disadvantage of LaTeX’s
that the resulting plain text file list looked good with base filenames
only that had up to eight characters. longnamefilelist
made up for this disadvantage, and nicefilelist
has additional refinements of aligning the list, proposed by
Martin Münch. To use them with
myfilist, they are loaded in 〈loading-settings〉
as well, and additional settings for column widths may be added there too.
This is what options
Besides in their own PDF documentation (that you find by following the
links), the packages are also briefly described in that file
to be read by a web browser.
However, more refined settings may be needed that cannot
be controlled by adhocfilelist’s interface so far.
has the effect that 〈loading-settings〉 becomes
〈tex-file-content〉 〈adhoc-adjust〉where 〈tex-file-content〉 is the content of the (
.texfile) 〈tex-file〉 (before
With adhocfilelist, that “
]” is inserted on option
〈tex-file〉will be needed to deal with certain directories 〈dir〉. Two ways come to my mind how to simplify this situation.
chmod) script file 〈script-file〉 with the following content:
Here 〈call〉 is as in the overview, and 〈more〉 may be empty or something else that you want to have fixed, such as
Then you can vary additional options/parameters 〈add〉 by
(Note that there is no “
〈tex-file〉” could be replaced by mere “
〈tex-file〉” if that 〈tex-file〉 is installed like a TeX package.)
Then you can vary additional options/parameters 〈add〉 by
\ProvideFilecontents of two files I knew I had edited that day. On 2012-09-26, I had thought about simplifying typeoutfileinfo by using a single command line without any piping. I realized that LaTeX s
\typeoutcould be replaced by
\ReadFileInfosfrom myfilist. Therefore “ad hoc”.
Maybe the same day later,
I realized that I could no longer remember which files I changed that day.
In July I had discovered
$(find ...). Now I thought that this
could be used here. “Ad hoc” is less appropriate here, and first I thought
that there will be different script files for explicitly specified files
than for applying find.
Only then I learnt real shell programming by googling, kind of chance,
and most helpfully from Chapter 3 of Jürgen Wolfs
from Galileo Press
getopts — bad here, however)
and Prof. Jürgen Plates
(“Optionen ermitteln” — “by hand”).
Then quoting/escaping for filename extensions with find became difficult … Quotation marks and “positional parameters” with the shell are very difficult/painful — TeX is more straightforward … On the other hand it is nice that the entire command line with all the “parameters” is gobbled.
Last revised 2013-01-04 © Uwe Lück
License: LPPL 1.3c or later, author-maintained.
[→ top of page ]