summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-27 21:42:12 +0000
committerKarl Berry <karl@freefriends.org>2013-03-27 21:42:12 +0000
commit086cac171c683caf6fa19aa9e4c3bbbaa06ceeb4 (patch)
tree4490bf94ee0ffadd35fe934eaa8c25f9716d898a
parent2cd41c75a2ebe18504b8ffbdaf0b7ed4fa279b30 (diff)
filedate (27mar13)
git-svn-id: svn://tug.org/texlive/trunk@29529 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/filedate/Announce.txt9
-rw-r--r--Master/texmf-dist/doc/latex/filedate/SrcFILEs.txt12
-rw-r--r--Master/texmf-dist/doc/latex/filedate/filedate.pdfbin583065 -> 610198 bytes
-rw-r--r--Master/texmf-dist/source/latex/filedate/fdatechk.tex7
-rw-r--r--Master/texmf-dist/source/latex/filedate/filedate.tex42
-rw-r--r--Master/texmf-dist/source/latex/filedate/srcfiles.tex4
-rw-r--r--Master/texmf-dist/tex/latex/filedate/filedate.RLS1
-rw-r--r--Master/texmf-dist/tex/latex/filedate/filedate.sty242
8 files changed, 242 insertions, 75 deletions
diff --git a/Master/texmf-dist/doc/latex/filedate/Announce.txt b/Master/texmf-dist/doc/latex/filedate/Announce.txt
index db0fcd272e9..be87aee77b3 100644
--- a/Master/texmf-dist/doc/latex/filedate/Announce.txt
+++ b/Master/texmf-dist/doc/latex/filedate/Announce.txt
@@ -41,3 +41,12 @@ FOURTH UPLOAD 2012-11-11: v0.4 has
* \NoFileDateAutoChecks restoring the original behaviour
of \Provides..., e.g., for files whose original time
stamp has not been preserved in copying/sending
+
+UPLOAD 2013-03-27, v0.41:
+
+ * \FileDateLevelChecks etc., \FileDateUserChecks etc.
+ do not check as much automatically as
+ \FileDateAutoChecks does. E.g., .fd files may be
+ loaded "indirectly" whose modification date is not
+ the \Provides... date, ignore them!
+
diff --git a/Master/texmf-dist/doc/latex/filedate/SrcFILEs.txt b/Master/texmf-dist/doc/latex/filedate/SrcFILEs.txt
index 1b644e1d997..f76ca4f07d0 100644
--- a/Master/texmf-dist/doc/latex/filedate/SrcFILEs.txt
+++ b/Master/texmf-dist/doc/latex/filedate/SrcFILEs.txt
@@ -1,13 +1,13 @@
*File List*
-filedate.sty 2012/11/11 v0.4 check file dates (UL)
-filedate.tex 2012/11/11 -- documenting filedate.sty
+filedate.sty 2013/03/26 v0.41 check file dates (UL)
+filedate.tex 2013/03/25 -- documenting filedate.sty
wrong.tex 2012/10/15 -- filedate.sty demo
-fdatechk.tex 2012/11/06 -- `filedate' checks
-filedate.RLS 2012/11/11 v0.4 \[No]FileDateAutoChecks
-srcfiles.tex 2012/11/06 -- file infos -> SrcFILEs.txt
+fdatechk.tex 2013/03/25 -- `filedate' checks
+filedate.RLS 2013/03/27 v0.41 restricted auto-checks
+srcfiles.tex 2013/03/25 -- file infos -> SrcFILEs.txt
***********
- List made at 2012/11/11, 16:43
+ List made at 2013/03/27, 00:27
from script file srcfiles.tex
diff --git a/Master/texmf-dist/doc/latex/filedate/filedate.pdf b/Master/texmf-dist/doc/latex/filedate/filedate.pdf
index 989d31335c2..e0ff09cdab9 100644
--- a/Master/texmf-dist/doc/latex/filedate/filedate.pdf
+++ b/Master/texmf-dist/doc/latex/filedate/filedate.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/filedate/fdatechk.tex b/Master/texmf-dist/source/latex/filedate/fdatechk.tex
index 6e8d2dfe26c..9856c423ef2 100644
--- a/Master/texmf-dist/source/latex/filedate/fdatechk.tex
+++ b/Master/texmf-dist/source/latex/filedate/fdatechk.tex
@@ -1,10 +1,7 @@
-\ProvidesFile{fdatechk.tex}[2012/11/06 `filedate' checks]
-%% TODO short notation
+\ProvidesFile{fdatechk.tex}[2013/03/25 `filedate' checks]
\EqualityMessages
-\CheckDateOfPDFmod{filedate.sty}
-\CheckDateOfPDFmod{filedate.tex}
\ReadFileInfos{filedate.RLS,srcfiles}
-\CheckDateOfPDFmod{filedate.RLS}
+\DoWithBasesExts{\CheckDateOfPDFmod}{filedate}{sty,tex,RLS}
\CheckDateOfPDFmod{srcfiles.tex}
\DatesDiffWarnings
\CheckDateOfToday{filedate.RLS}
diff --git a/Master/texmf-dist/source/latex/filedate/filedate.tex b/Master/texmf-dist/source/latex/filedate/filedate.tex
index 92c07a73351..6be4950cbe9 100644
--- a/Master/texmf-dist/source/latex/filedate/filedate.tex
+++ b/Master/texmf-dist/source/latex/filedate/filedate.tex
@@ -1,4 +1,4 @@
-\ProvidesFile{filedate.tex}[2012/11/11 documenting filedate.sty]
+\ProvidesFile{filedate.tex}[2013/03/25 documenting filedate.sty]
%% 2012/06/24
\title{\pkgtitle{filedate.sty}{Access and Compare
\LaTeX~File~% %% 2012/11/06
@@ -8,7 +8,7 @@
% \listfiles
{ \RequirePackage{makedoc} \ProcessLineMessage{}
\MakeJobDoc{18}%% 2012/10/16
- {\SectionLevelTwoParseInput} }
+ {\SectionLevelThreeParseInput} } %% Three 2013/03/24
\documentclass[fleqn]{article}%% TODO paper dimensions!?
\input{makedoc.cfg} %% shared formatting settings
\usepackage{filedate,readprov}
@@ -16,12 +16,14 @@
%% <- were these two 2012/10/25 ->
document versions, macro programming}
\usepackage{lmodern}
+\usepackage{filesdo} %% TODO makedoc.cfg? 2013/03/25
\sloppy
\providecommand*{\LuaTeX}{Lua\TeX}
\providecommand*{\pdfTeX}{pdf\TeX}
\providecommand*{\XeLaTeX}{X\lower.5ex\hbox{E}\kern-.125em\LaTeX}
%% <- TODO some logo package
% \newcommand*{\qtdfile}{} %% 2012/11/06
+\newcommand*{\secref}[1]{Section~\ref{sec:#1}} %% 2013/03/24
\begin{document}
\maketitle
\begin{MDabstract}
@@ -50,8 +52,17 @@ a \LaTeX\ file is loaded while typesetting or in a
% \newpage
\section{Features and Usage}
-
-\subsection{Installing and Calling}
+\subsection{Basics of Usage} %% 2013/03/24
+\subsubsection{The Most Interesting Command}
+The package allows to check whether the file \strong{info}
+date <date> according to `\Provides' near the top of a \LaTeX\
+input file <file>---i.e.,
+\[`\Provides...{<file>}[<date> ...]'\]
+has been updated the same day when <file> actually was \strong{modified}
+most recently. With \pdfTeX, this can be checked by
+\[|\CheckDateOfPDFmod{<file>}|\]
+
+\subsubsection{Installing and Calling}
The file 'filedate.sty' is provided ready, installation only requires
putting it somewhere where \TeX\ finds it
(which may need updating the filename data
@@ -65,7 +76,7 @@ but in ``\TeX\ scripts" such as \hyperref[sec:wrong]{below},
\[|\RequirePackage{filedate}|\]
is better.
-\subsection{Demonstration with a ``\TeX\ script" Example}
+\subsubsection{Demonstration with a ``\TeX\ script" Example}
\label{sec:wrong}
The accompanying `wrong.tex' is an example of a ``\pkg{filedate} \TeX\ script"
demonstrating what may go wrong.
@@ -80,7 +91,7 @@ demonstrating what may go wrong.
% \cs{CheckDateOfToday}\{wrong.tex\}
% \cs{stop}
% \end{quotation}
-\MDsampleinput{wrong}
+\MDsamplecodeinput{wrong}
\ReadFileInfos{wrong}
You may run it (by the command line \qtd{\file{latex wrong}}) and experience:
\begin{enumerate}
@@ -110,13 +121,15 @@ You may run it (by the command line \qtd{\file{latex wrong}}) and experience:
% \subsection{The Single Commands}
% $\dots$ are described below near to their implementation.
-% \pagebreak
+ \pagebreak[2] %% 2013/03/25
\section{Implementation and Single Commands}
\subsection{Package File Header (Legalese)}
\input{filedate.doc}
+ \pagebreak %% 2013/03/25
\section{Use with Present Package Documentation}
+\label{sec:demo-here}
%% mod. 2012/11/06:
\noNiceVerb
\input{fdatechk.tex}
@@ -128,7 +141,7 @@ Above this paragraph,
the documentation source `filedate.tex' issues
\[|\input{fdatechk.tex}|\]
in order to run the following \TeX~script `fdatechk.tex':
-\MDsampleinput{fdatechk}
+\MDsamplecodeinput{fdatechk}
(That is done \emph{above} the paragraph to avoid wrong spacing
within the paragraph from `filedate.tex'.)
This way we check whether the ``info dates" of the package file
@@ -140,9 +153,12 @@ When I added the (original) check on 2012-10-17,
it indeed informed me that I had not updated
`filedate.tex's info date
(\code{2012/10/16},
- generation of first version of the file from a template, draft).
-
+ generation of first version of the file from a template,
+ draft).---%%% 2013/03/25
|\EqualityMessages| confirms that the tests were run indeed.
+%
+|\DoWithBasesExts| is from the 'filesdo' package
+(\ctanpkgdref{commado} bundle).
The \TeX~script `srcfiles.tex' that in the first instance
generates a release overview additionally inputs `fdatechk.tex'
@@ -168,3 +184,9 @@ VERSION HISTORY
for \qtd{\file{..., and other mod.s of
doc. there; title extended
2012/11/11 for v0.4 v0.4 in abstract
+2013/03/24 for v0.41 deeper sectioning level, \secref,
+ \MDsamplecodeinput (+ `code'),
+ \subsubsections for "Basic Usage"
+2013/03/25 for v0.41 \usepackage{filesdo}, \label{sec:demo-here},
+ mentioning `filesdo' there;
+ folding and page breaks
diff --git a/Master/texmf-dist/source/latex/filedate/srcfiles.tex b/Master/texmf-dist/source/latex/filedate/srcfiles.tex
index c334d9fb444..e354f5786d5 100644
--- a/Master/texmf-dist/source/latex/filedate/srcfiles.tex
+++ b/Master/texmf-dist/source/latex/filedate/srcfiles.tex
@@ -1,6 +1,6 @@
-\ProvidesFile{srcfiles.tex}[2012/11/06 file infos -> SrcFILEs.txt]
+\ProvidesFile{srcfiles.tex}[2013/03/25 file infos -> SrcFILEs.txt]
\RequirePackage[r]{nicefilelist}
-\RequirePackage{filedate}
+\RequirePackage{filedate,filesdo}
\MaxBaseEmptyList*[filedate.sty] %%% [readprov.sty,myfilist.sty]
%% packages:
\ReadPackageInfos{filedate}
diff --git a/Master/texmf-dist/tex/latex/filedate/filedate.RLS b/Master/texmf-dist/tex/latex/filedate/filedate.RLS
index 5f48a2845f2..54aac127d66 100644
--- a/Master/texmf-dist/tex/latex/filedate/filedate.RLS
+++ b/Master/texmf-dist/tex/latex/filedate/filedate.RLS
@@ -1,4 +1,5 @@
\ProvidesFile{filedate.RLS} %% RELEASE INFO\
+ [2013/03/27 v0.41 restricted auto-checks]
[{2012/11/11 v0.4 \string\[No]FileDateAutoChecks}]
[2012/11/06 r0.3a `fdatechk.tex']
[2012/11/06 v0.3 \DatesDiffWarning]
diff --git a/Master/texmf-dist/tex/latex/filedate/filedate.sty b/Master/texmf-dist/tex/latex/filedate/filedate.sty
index 0fd44cbc674..f518cb3339b 100644
--- a/Master/texmf-dist/tex/latex/filedate/filedate.sty
+++ b/Master/texmf-dist/tex/latex/filedate/filedate.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{filedate}[2012/11/11 v0.4 check file dates (UL)]
+\ProvidesPackage{filedate}[2013/03/26 v0.41 check file dates (UL)]
-%% Copyright (C) 2012 Uwe Lueck,
+%% Copyright (C) 2012 2013 Uwe Lueck,
%% http://www.contact-ednotes.sty.de.vu
%% -- author-maintained in the sense of LPPL below --
%%
@@ -16,8 +16,8 @@
%%
%% http://www.contact-ednotes.sty.de.vu
%%
-%% \filbreak %% 2012/11/10
-%% === The \ctanpkgref{readprov} Package ===
+%% % \filbreak %% 2012/11/10 rm. 2013/03/25
+%% === The 'readprov' Package ===
%% \label{sec:readprov}
% \RequirePackage{readprov}
%% ---is required for \[|\ReadInfoDate{<file>}|\quad
@@ -27,9 +27,11 @@
%% (sections~\ref{sec:readinfo} and \ref{sec:readcheck})
%% % below
%% only.
-%% Please care for providing it on your own if you need that.
+%% Please care for providing \ctanpkgdref{readprov} %% href 2013/03/25
+%% on your own if you need that.
%%
-%% === Accessing ``Info Date" ===
+%% === Providing Dates for Comparisons === %% 2013/03/24
+%% ==== Accessing ``Info Date" ====
%% \label{sec:readinfo}
%% |\theinfodateof{<file>}| will expand to the first ``word" of the
%% `\Provides'\code{...} entry, provided that has been read before:
@@ -53,18 +55,22 @@
\ReadFileInfos{#1}\LoadInfoDateOf{#1}}
%% TODO provide automatically.
%%
-%% === Accessing \cs{pdffilemoddate} ===
+%% ==== Accessing \cs{pdffilemoddate} ====
+%% \label{sec:pdfmod}
%% |\pdffilemoddate{<file>}| in the first instance is a \ctanpkgref{pdftex}
-%% primitive. With \LuaTeX, \ctanpkgref{pdftexcmds} provides it.
+%% primitive. With \LuaTeX,
+%% \ctanpkgdref{pdftexcmds} provides it. %% d 2013/03/25
%% Currently, you must care for this yourself before loading the
-%% present package. I recommend the \ctanpkgref{filemod} documentation for
+%% present package. I recommend the
+%% \ctanpkgdref{filemod} documentation for %% d 2013/03/25
%% details about \cs{pdffilemoddate}.
%%
-%% Otherwise, (with \XeLaTeX) the modification date may be obtained
-%% by a (shell) script---the next definitions do \emph{not} deal with
-%% the latter situation. Testing against ``today"
-%% (|\rawtoday| in Section~\ref{sec:rawtoday})
-%% may be another alternative.
+%% %% rm. 2013/03/24:
+%% % Otherwise, (with \XeLaTeX) the modification date may be obtained
+%% % by a (shell) script---the next definitions do \emph{not} deal with
+%% % the latter situation. Testing against ``today"
+%% % (|\rawtoday| in Section~\ref{sec:rawtoday})
+%% % may be another alternative.
%%
%% |\thepdfmoddateof{<file>}| expands to the modification date
%% (eight digits separated by two slashes) if `\pdffilemoddate'
@@ -83,11 +89,15 @@
%% \httpref{stackoverflow.com/questions/2118972/latex-command-for-last-modified}{%
%% \urlfmt{stackoverflow.com}} in another discussion of accessing modification dates,
%% including use of scripts.
-%% `\string D' deals with the fact that `\pdffilemoddate' returns in ``other"
-%% character tokens.
+%% `\string D' deals with the fact that `\pdffilemoddate' returns
+%% % in %% rm. 2013/03/24
+%% ``other" character tokens.
\fi
+%% The modification date of <file> according to `\pdffilemoddate'
+%% will be available as `\thepdffilemoddate' after
+%% `ReadPDFfileModDateOf{<file>}', see \secref{short-refdates}.
%%
-%% === \cs{rawtoday} ===
+%% ==== \cs{rawtoday} ====
%% \label{sec:rawtoday}
%% % Enabling `\CheckDateOf{<file>}{\rawtoday}':
%% |\rawtoday| accesses ``today"'s date as eight digits separated
@@ -95,12 +105,13 @@
\newcommand*{\rawtoday}{%
\the\year/\two@digits{\the\month}/\two@digits{\the\day}}
%%
-%% === Comparing ===
+%% === Comparing Basically ===
%% \label{sec:readcheck}
-%% |\CheckDateOf{<file>}{<date>}| compares <file>'s info date with
-%% <date>:
+%% |\CheckDateOf{<file>}{<ref-date>}| compares <file>'s \strong{info} date with
+%% the \strong{reference} date <ref-date>:
\newcommand*{\CheckDateOf}[2]{%
-%% We provide a check that does not affect the order with \ctanpkgref{myfilist}.
+%% We provide a check that does not affect the order with
+%% \ctanpkgdref{myfilist}. %% 2013/03/25
% \ReadFileInfos{#1}%
%% The date according to `\Provides' will be accessible as |\theinfodate|:
\LoadInfoDateOf{#1}%
@@ -113,15 +124,22 @@
\else
\FD@datesdiff{#1}%
\fi}
-%% |\ReadCheckDateOf{<file>}{<date>}| prepends |\ReadFileInfos{<file>}|
-%% from the \ctanpkgref{readprov} package (cf. Section~\ref{sec:readprov}):
+%% The \strong{reference} date may be either (i)~\emph{today} as accessed
+%% by `\rawtoday' (\secref{rawtoday}), (ii)~the \emph{modification} date as accessed
+%% by `\pdffilemoddate' (\secref{pdfmod}), (iii)~something \emph{else} relevant,
+%% e.g., a modification date determined and inserted by a shell script.
+%% %% <- added 2013/03/24
+%%
+%% |\ReadCheckDateOf{<file>}{<date>}| \ prepends \ |\ReadFileInfos{<file>}|
+%% from the \ctanpkgref{readprov} package (cf. Section~\ref{sec:readprov}),
+%% in order to ensure that the \strong{info} date is known:
\newcommand*{\ReadCheckDateOf}[1]{%
\ReadFileInfos{#1}\CheckDateOf{#1}}
%% TODO provide automatically.
%%
-%% \filbreak
-%% === Reporting Styles ===
-%% By default, there is no report about comparisons finding equality.
+%% === Reporting Styles === %% subsections 2013/03/24
+%% ==== Same Dates ====
+%% By default, there is no report about comparisons finding \strong{equality}.
\let\FD@datesequal\@gobble
%% % We do not want to disturb `\listfiles' with \ctanpkgref{myfilist}.
%% %% <- rm. 2012/10/25
@@ -140,8 +158,9 @@
%% |\theinfodateof{#1}|, there is no essential application of
%% `\theinfodate' currently.
%%
-%% After |\DatesDiffErrors|, date differences are reportet ``drastically"
-%% by `\PackageError':
+%% ==== Differing Dates ====
+%% After |\DatesDiffErrors|, date \strong{differences}
+%% are reportet ``drastically" by `\PackageError':
\newcommand*{\DatesDiffErrors}{\let\FD@datesdiff\FD@errdatesdiff}
%% This is the default:
\DatesDiffErrors
@@ -158,6 +177,13 @@
\def\FD@warndatesdiff#1{%
\PackageWarningNoLine{filedate}%
{\FD@infodate{#1}\FD@refdate}}
+%% ==== Kinds of Reference Dates ====
+%% When the reference date is `\pdffilemoddate', the report about
+%% a comparison may call it a ``modification date".
+%% But when the reference date is ``today", it may not be a
+%% ``modification date". Otherwise, it depends ...
+%% (See \secref{readcheck} for kinds of reference dates.)
+%%
%% After |\ModDates|, reference dates are called ``modification'' dates:
\newcommand*{\ModDates}{\let\FD@refdate\FD@moddate}
\def\FD@moddate{\MessageBreak vs. modification date \FD@therefdate}
@@ -168,7 +194,32 @@
%% That's the default:
\SomeDates
%%
-%% === Reference Date ``Types" ===
+%% === Shorthands ===
+%% %% mod. again 2013/03/25
+%% We may want to compare \emph{info} with \emph{reference} dates for
+%% many files. But when the \emph{reference} date is `\pdffilemoddate'
+%% for many files
+%% (probably the most frequent application, see \secref{pdfmod}),
+%% we don't want to state this explicitly for each
+%% file---\secref{short-refdates}---neither
+%% for other kinds of reference dates.
+%%
+%% As to enumerating \emph{file names}, the 'filesdo' package
+%% from the \ctanpkgdref{commado} bundle should help
+%% (combinations of base names and extensions,
+%% see \secref{demo-here}; %% 2013/03/25
+%% TODO: shorthands using 'filesdo' could be defined
+%% in the present package).
+%%
+%% The files <in-file> whose dates we want to check may be just
+%% the same that some <reading-file> tries to `\input'.
+%% It may me helpful if those input commands trigger the
+%% file consistency check without a need to demand this explicitly
+%% for each file---the section on ``automatic immediate checking"
+%% (\secref{auto-check}) aims at this.
+%%
+%% ==== Kinds of Reference Dates ====
+%% \label{sec:short-refdates}
%% |\ReadPDFmodDateOf{<file>}| enables
%% \[|\CheckDateOf{<file>}{\thepdfmoddate}|\]
%% by setting |\thepdfmoddate|:
@@ -189,7 +240,7 @@
%% \[<4-digits>/<2-digits>/<2-digits>\quad
%% (`yyyy/mm/dd')\]---a script might insert it---,
%% `\rawtoday', or `\thepdfmoddate'.
-%% \ctanpkgref{adhocfilelist} v0.7 (with option \strong{\code{-c}})
+%% \ctanpkgdref{adhocfilelist} v0.7 (with option \strong{\code{-c}})
%% is such a script, a shell script generating a ``\TeX\ script",
%% providing the file modification date according to Unix/Linux.
\newcommand*{\UseReferenceDate}{\def\thedategiven}
@@ -217,7 +268,8 @@
\CheckDateOf{#1}{\rawtoday}%
\endgroup}
%%
-%% === Automatical Immediate Checking ===
+%% ==== Automatic Immediate Checking ====
+%% \label{sec:auto-check}
%% |\FileDateAutoChecks| modifies the \qtdcode{&\Provides...}
%% commands internally so that they check their date with
%% with the file's modification date according to
@@ -231,34 +283,114 @@
%% `\@profidesfile' are used as hooks. Their original meanings
%% are stored so they can be regained by \qtd{&\NoFile...}:
\let\FD@@provpkg\@pr@videpackage
-\def\FD@provpkg[#1]{%
- \FD@@provpkg[#1]%
- \CheckDateOfPDFmod{\@currname.\@currext}}
+\def\FD@provpkg[#1]{\FD@@provpkg[#1]%
+ \CheckDateOfPDFmod{\@currname.\@currext}}
\let\FD@@provfile\@providesfile
-\def\FD@provfile#1[#2]{%
- \FD@@provfile{#1}[#2]%
- \CheckDateOfPDFmod{#1}}
+\def\FD@provfile#1[#2]{\FD@@provfile{#1}[#2]%
+ \CheckDateOfPDFmod{#1}}
%% |\FileDateAutoChecks*| in addition to `\FileDateAutoChecks'
%% checks the main file's info date,
-%% assuming the main file is `\jobname.tex':
+%% assuming the main file is `\jobname.tex'
+%% (TODO): %% 2013/03/25 cf. \@iinput
\newcommand*{\FileDateAutoChecks}{%
- \@ifstar{\CheckDateOfPDFmod{\jobname.tex}%
- \FD@autochecks}%
- {\FD@autochecks}}
-\newcommand*{\FD@autochecks}{%
- \let\@pr@videpackage\FD@provpkg
- \let\@providesfile\FD@provfile}
-\newcommand*{\NoFileDateAutoChecks}{%
- \let\@pr@videpackage\FD@@provpkg
- \let\@providesfile\FD@@provfile}
+ \@ifstar{{\FD@check@pdf@job\FD@autochecks}\FD@autochecks}%
+ \FD@autochecks}
+%% |\FD@check@pdf@job| is introduced in v0.41 for the
+%% ``restricted" automatic checks below.
+\newcommand*{\FD@check@pdf@job}{\CheckDateOfPDFmod{\jobname.tex}}
+\newcommand*{\FD@autochecks}{\let\@pr@videpackage\FD@provpkg
+ \let\@providesfile\FD@provfile}
+\newcommand*{\NoFileDateAutoChecks}{\let\@pr@videpackage\FD@@provpkg
+ \let\@providesfile \FD@@provfile}
%%
-%% TODO single check commands for comma-separated list of files,
-%% (\ctanpkgref{dowith})
+%% However, see \secref{auto-level} for \strong{problems}
+%% of the previous idea
+%% (unless using \ctanpkgdref{fileinfo}, i.e., 'readprov' or even 'myfilist').
%%
-%% === Leaving the Package File ===
-\endinput
+%% \pagebreak %% 2013/03/25
+%% ==== Level-Restricted Automatic Checking ==== %% 2013/03/25
+%% \label{sec:auto-level}
+%% The present package is made to ensure ``date consistency"
+%% of files that the user maintains/edits. By contrast,
+%% date consistency cannot be expected for \LaTeX\ package
+%% files that were generated by \ctanpkgdref{docstrip}
+%% (many days after the `.dtx' source was released).
+%% No date consistency checks should be applied to such files.
+%% (The ``criticism" of the present section does not apply to
+%% usage with \ctanpkgref{fileinfo}, and the commands presented
+%% here \emph{disable} 'fileinfo', so don't use them with 'fileinfo'.)
+%%
+%% The problem with `\FileDateAutoChecks' (\secref{auto-check}) is,
+%% e.g., that a chapter file for a book that is `\include'd by
+%% the master file may trigger loading a font definition file
+%% (`.fd')---that is not date-consistent, though the test is
+%% applied to it. We now aim at checking only those files
+%% that are input by the file that contains the call,
+%% not to files that are input indirectly.
+%% We use `\InputIfFileExists' as a hook for this.
+%% This should affect \emph{\LaTeX} user commands for file inclusion,
+%% even for (the user's) packages and class files.
+%% It does \emph{not} affect the version of `\input' without braces.
+%% The commands for this purpose are |\FileDateLevelChecks|,
+%% |\FileDateLevelChecks*|, and |\NoFileDateLevelChecks|
+%% (replacing `Auto' by `Level' for analogy to the commands
+%% of \secref{auto-check}).
+%%
+%% The implementation is somewhat recursive, or ``counter-recursive"?
+\def\FD@level@provpkg [#1]{\FD@provpkg[#1]%
+ \NoFileDateLevelChecks}
+\def\FD@level@provfile#1[#2]{\FD@provfile{#1}[#2]%
+ \NoFileDateLevelChecks}
+%% |\FD@userchecks@| is introduced for \secref{auto-user}:
+\newcommand*{\FD@userchecks@}{\let\@pr@videpackage\FD@level@provpkg
+ \let\@providesfile\FD@level@provfile}
+\newcommand*{\FD@levelchecks}{\FD@userchecks@
+ \let\InputIfFileExists\FD@input@if@f@ex}
+\let\FD@@input@if@f@ex\InputIfFileExists
+\newcommand{\FD@input@if@f@ex}[3]{\FD@@input@if@f@ex{#1}{#2}{#3}%
+ \FD@levelchecks}
+\newcommand*{\FileDateLevelChecks}{%
+ \@ifstar{\CheckDateOfPDFmod{\jobname.tex}\FD@levelchecks}%
+ \FD@levelchecks}
+\newcommand*{\NoFileDateLevelChecks}{%
+ \NoFileDateAutoChecks \let\InputIfFileExists\FD@@input@if@f@ex}
+%% Section \ref{sec:auto-user} introduces another idea
+%% to avoid checking of \LaTeX\ package files.
%%
-%% === VERSION HISTORY ===
+%% ==== User-Restricted Automatic Checking ==== %% 2013/03/26
+%% \label{sec:auto-user}
+%% Another idea to avoid checking of \LaTeX\ package files
+%% while checking `\input' files automatically are
+%% |\FileDateUserChecks| and |\FileDateUserChecks*|
+%% only affecting user transclusion commands %%% such as
+%% `\include{<file>}' and `\input{<file>}' while allowing
+%% nesting, i.e., e.g., even an `\input{<indir>}' in an
+%% `\include'd file is checked automatically.
+%% (See \secref{auto-level} if you do not remember what is
+%% bad with \secref{auto-check}.)
+\let\FD@@iinput\@iinput \let\FD@@include\@include
+%% Using definitions from above:
+\newcommand*{\FD@userchecks}{%
+%% `\@iinput' is \LaTeX's internal behind `\input':
+ \def\@iinput##1{%
+ \FD@userchecks@\FD@@iinput{##1}\NoFileDateAutoChecks}%
+%% `\@include' is \LaTeX's internal behind `\include'.
+%% Its argument is limited by a space:
+ \def\@include##1 {%
+ \FD@userchecks@\FD@@include##1 \NoFileDateAutoChecks}}
+%% Temporary switching off `\FD@provpkg' and `\FD@provfile'
+%% is doubled to deal with files that don't have a
+%% `\Provides' entry.
+\newcommand*{\FileDateUserChecks}{%
+ \@ifstar{\FD@check@pdf@job\FD@userchecks}\FD@userchecks}
+\newcommand*{\NoFileDateUserChecks}{%
+ \let\@iinput\FD@@iinput \let\@include\FD@@include}
+%% TODO `\usepackage', `\documentclass'?
+%%
+%% === Leaving the Package File ===
+\endinput
+%% \pagebreak %% 2013/03/25
+%% === VERSION HISTORY ===
v0.1 2012/10/15 core try, bad
v0.2 2012/10/16 code for first release
@@ -275,3 +407,9 @@ v0.4 2012/11/10 \fd@ -> \FD@, doc. v0.7 -> v0.3, v0.21,
\filbreak; code for \...AutoChecks
2012/11/11 doc. another \filbreak, documenenting
\...AutoChecks, \...AutoChecks*
+v0.41 2013/03/24 doc. restructured and extended
+ 2013/03/25 ... continued; section with \FileDateLevelChecks
+ etc., \@ifstar without braces;
+ doc. automatical ("archaic") -> automatic,
+ reducing numbers of lines
+ 2013/03/26 \FileDateUserChecks etc., \FD@check@pdf@job