diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fileinfo/fileinfo.RLS | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fileinfo/myfilist.sty | 127 |
2 files changed, 124 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/fileinfo/fileinfo.RLS b/Master/texmf-dist/tex/latex/fileinfo/fileinfo.RLS index f7ede438b03..2180af2d397 100644 --- a/Master/texmf-dist/tex/latex/fileinfo/fileinfo.RLS +++ b/Master/texmf-dist/tex/latex/fileinfo/fileinfo.RLS @@ -1,4 +1,6 @@ \ProvidesFile{fileinfo.RLS} %% RELEASE INFO - [2012/05/26 r0.4 myfilelist v0.4: options] + [2012/10/12 r0.6 myfilist v0.6a, correcting r0.5] + [{2012/10/11 r0.5 myfilist v0.5f.: fake entries, [no-bot]}] + [2012/05/26 r0.4 myfilist v0.4: options] [2012/03/18/20 r0.3b+ internal!?] %% 2012/05/26 [2012/03/18/18 r0.3b doc. (generation) mod.s] %% 2012/05/26 diff --git a/Master/texmf-dist/tex/latex/fileinfo/myfilist.sty b/Master/texmf-dist/tex/latex/fileinfo/myfilist.sty index 07e6f74b285..355bb29d1cf 100644 --- a/Master/texmf-dist/tex/latex/fileinfo/myfilist.sty +++ b/Master/texmf-dist/tex/latex/fileinfo/myfilist.sty @@ -3,7 +3,7 @@ %% modifies \listfiles to choose files to be listed and %% list them in a chosen file. -\def \fileversion {0.4} \def \filedate {2012/05/26} +\def \fileversion {0.6a} \def \filedate {2012/10/12} %% copyright (C) 2008, 2010, 2011, 2012 Uwe Lueck, %% http://www.contact-ednotes.sty.de.vu @@ -81,8 +81,66 @@ % informations, but quits them as soon as it has found one of these % LaTeX2e commands. % +% VARIANTS: +% +% v0.5 provides different interfaces to reduce (shared) TeX code +% when (similar) shell or batch scripts generate that gather.tex. +% +% \ReadListFileInfos[<txt-file>]{<tex-files>} +% +% is a shorthand for +% +% \ReadFileInfos{<tex-files>} +% \ListInfos[<txt-file>] +% +% \emph{Without} the optional argument, the screen output is \emph{not} +% written to disk---by default. However, preceding \ReadListFileInfos +% by +% +% \WriteFileInfosTo{<txt-file>} +% +% is an alternative way to get the list in the plain text file. +% +% \FindReadListFileInfos[<txt-file>]{<tex-files>} +% +% must be used rather than \ReadListFileInfos\ when the comma-separated +% list (generated by the "find" utility) \emph{starts} with a comma. +% Alternatively, +% +% \UseFindUtility +% +% preceding \ReadListFileInfos deals with the leading comma. +% +% TRICKS: +% +% v0.6 first provides (e.g.) +% +% \FileListRemark[----]{---DOC.---} +% +% in order to insert `---DOC.--- ----' in the list. This writes +% funny files that may be somewhat dangerous ... +% I have used a bash script version of this for structuring +% large file lists. +% +% v0.6 moreover provides two hooks and a package option +% useful for the adhocfilelist package, +% or perhaps even otherwise. +% +% \ListGenerator +% +% is a hook for the final lines in the plain text output file (see implementation). +% +% \NoBottomLines +% +% suppresses final messages of the LaTeX run, which may be nicer and +% more informative on the screen. Package Option +% +% [no-bot] +% +% is a kind of shorthand to issue \NoBottomLines. +% % IMPLEMENTATION: - +% \NeedsTeXFormat{LaTeX2e}[1994/12/01] %% \newcommand* etc. \ProvidesPackage{myfilist} [\filedate\space v\fileversion \space @@ -102,7 +160,7 @@ % |\ListInfos[<external output file>]| \newcommand*{\ListInfos}[1][]{% \ifx$#1$\@dofilelist\else - \newwrite\file@of@filelist + % \newwrite\file@of@filelist %% mv. v0.6 \immediate\openout\file@of@filelist=#1\relax \def\typeout##1{% \read@@typeout{##1}% @@ -114,14 +172,65 @@ \multiply\count@ 60 \advance\@tempcntb -\count@ \typeout{ List made at \the\year/\two@digits{\the\month}/\two@digits{\the\day}, - \two@digits{\the\@tempcnta}:\two@digits{\the\@tempcntb}^^J - from script file \jobname.tex^^J}%% TODO ".tex"!? 2008/03/19 + \two@digits{\the\@tempcnta}:\two@digits{\the\@tempcntb}% +% v0.6 becomes more flexible here: + \ListGenerator} \immediate\closeout\file@of@filelist \fi \stop} %% <- TODO how to suppress first empty line? 2008/03/16 - %% -> TODO more general style of output file 2008/03/19 +\newwrite\file@of@filelist %% mv. v0.6 +% emulating versions before v0.6: +\providecommand*{\ListGenerator}{% + ^^J from script file \jobname.tex^^J} \let\read@@typeout\typeout +% v0.5: +% +% There is a little (design) bug in \ListInfos: +% When gather.tex's last line is \ListInfos without optional +% argument or anything, LaTeX prompts for further input. +% This might be fixed using ifnextok.sty, but I am not sure +% right now. In |\VarListInfos|, \relax stops waiting for +% input. \providecommand means that the default can be +% overridden before loading myfilist.sty: +\providecommand*{\VarListInfos}{\ListInfos\relax} +% |\WriteFileInfosTo{<txt-file>}| overrides the previous default: +\newcommand*{\WriteFileInfosTo}[1]{% + \renewcommand\VarListInfos{\ListInfos[#1]}} +% |\ReadListFileInfos[<txt-file>]{<tex-files>}| +\newcommand*{\ReadListFileInfos}[2][]{% + \ifx$#1$\else\WriteFileInfosTo{#1}\fi + \read@comma@guard\read@list@file@infos#2\stop} +\let\read@comma@guard\@empty +\def\read@list@file@infos#1\stop{% +% Here |\VarListInfos| is used finally: + \ReadFileInfos{#1}\VarListInfos} +% |\UseFindUtility| activates \read@comma@guard in order +% to kill a leading comma: +\newcommand*{\UseFindUtility}{% + \let\read@comma@guard\@firstoftwo} +% |\FindReadListFileInfos[<txt-file>]{<tex-files>}| +\newcommand*{\FindReadListFileInfos}{% + \UseFindUtility\ReadListFileInfos} +% v0.6: +% +% |\FileListRemark[<info>]{<filename>}| \ +% writes and reads a dummy file <filename> with \Provides... +% content <info> which is empty by default: +\newcommand*\FileListRemark[2][]{% + \immediate\openout\file@of@filelist#2 + \immediate\write\file@of@filelist{% + \string\ProvidesFile{#2}[#1]}% + \immediate\closeout\file@of@filelist + \ReadFileInfos{#2}} +% +% |\NoBottomLines| +\newcommand*{\NoBottomLines}{% + \let\STOP\stop \def\stop{\batchmode\STOP}} +% Package option |[no-bot]|: +\DeclareOption{no-bot}{\NoBottomLines} +\ProcessOptions +% Finally issuing |\listfiles| (already before v0.5): \listfiles \endinput @@ -140,3 +249,9 @@ v0.3 2010/11/26 split off from "myfiles.sty", opt. arg. for v0.3a 2011/01/29 two empty lines commented out 2011/01/30 copyright updated v0.4 2012/05/26 \EmptyFileList clears options +v0.5 2012/09/27 \ReadListFileInfos, \WriteFileList, + \FindReadListInfos, \UseFindUtility +v0.6 2012/10/11 \FileListRemark, \ListGenerator, + \NoBottomLines, [no-bot] +v0.6a 2012/10/12 adding \UseFindUtility and \FindReadListInfos + in the history for v0.5 |