summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/filedate
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/filedate')
-rw-r--r--Master/texmf-dist/source/latex/filedate/filedate.tex139
-rw-r--r--Master/texmf-dist/source/latex/filedate/srcfiles.tex15
2 files changed, 154 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/filedate/filedate.tex b/Master/texmf-dist/source/latex/filedate/filedate.tex
new file mode 100644
index 00000000000..3867f22bb5f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/filedate/filedate.tex
@@ -0,0 +1,139 @@
+\ProvidesFile{filedate.tex}[2012/10/17 documenting filedate.sty]
+%% 2012/06/24
+\title{\pkgtitle{filedate.sty}{Access and Compare Info and Modification Date}}
+% \listfiles
+{ \RequirePackage{makedoc} \ProcessLineMessage{}
+ \MakeJobDoc{18}%% 2012/10/16
+ {\SectionLevelTwoParseInput} }
+\documentclass[fleqn]{article}%% TODO paper dimensions!?
+\input{makedoc.cfg} %% shared formatting settings
+\usepackage{filedate,readprov}
+\MDkeywords{package management, document versions}
+\sloppy
+\newcommand*{\TODO}[1][]{%
+ \textcolor{blue}{TODO\ifx$#1$\else\space#1\fi}}
+\providecommand*{\LuaTeX}{Lua\TeX}
+\providecommand*{\XeLaTeX}{X\lower.5ex\hbox{E}\kern-.125em\LaTeX}
+\begin{document}
+\maketitle
+\begin{MDabstract}
+'filedate.sty' provides basic access to the date of a
+\LaTeX\ source file according to its `\ProvidesFile',
+`\ProvidesPackage', or `\ProvidesClass' entry---the ``info date"---,
+as well as to its modification date according to `\pdffilemoddate'
+if the latter is available. Moreover commands are provided
+to compare the ``info date" with the modification date, with ``today"'s
+date, or with another date---that a script accessing modification dates
+such as \CtanPkgRef{adhocfilelist}{adhocfilelist.sh}
+may insert---, and to choose the effect of comparisons
+(error vs.\ ``notice," reference date characterization).
+Thus updating the ``info date" (``\strong{date consistency}")
+of a source file may be ensured by a test
+during typesetting from it or by some (shell/\TeX) script.
+
+\MDaddtoabstract{Related packages:} \ctanpkgref{filemod},
+\ctanpkgref{getfiledate}, \ctanpkgref{zwgetfdate},
+\ctanpkgref{fileinfo}
+\end{MDabstract}
+\tableofcontents
+
+% \newpage
+\section{Features and Usage}
+
+\subsection{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
+ base).\urlfoot{ukfaqref}{inst-wlcf} %% corr. 2011/02/08
+
+%% extended 2011/01/14:
+Below the `\documentclass' line(s) and above `\begin{document}',
+you load 'filedate.sty' (as usually) by
+\[|\usepackage{filedate}|\]
+but in ``\TeX\ scripts" such as \hyperref[sec:wrong]{below},
+\[|\RequirePackage{filedate}|\]
+is better.
+
+\subsection{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.
+% \begin{quotation}\tt\small
+% \expandafter\def\expandafter\{\expandafter{\string{}
+% \expandafter\def\expandafter\}\expandafter{\string}}
+% \obeyspaces\obeylines
+% \cs{ProvidesFile}\{wrong.tex\}[2012/10/15 filedate.sty demo]
+% \cs{RequirePackage}\{filedate\}
+% \cs{CheckDateOfPDFmod}\{wrong\}
+% \cs{CheckDateOfPDFmod}\{wrong.tex\}
+% \cs{CheckDateOfToday}\{wrong.tex\}
+% \cs{stop}
+% \end{quotation}
+\vskip \bigskipamount
+\hrule
+\verbatiminput{wrong}
+\hrule
+\vskip \bigskipamount
+\ReadFileInfos{wrong}
+You may run it (by the command line \qtd{\file{latex wrong}}) and experience:
+\begin{enumerate}
+% \AddQuotes
+ \item `wrong.tex''s ``info date" is \qtd{\file{\theinfodateof{wrong.tex}}},
+ but its modification date is at least one day later.
+ \item
+ `\CheckDateOfPDFmod{wrong}' demonstrates that in
+ \[|\CheckDateOfPDFmod{<file>}|\]
+ <file> must be the \Wikiref{filename} \emph{including extension.}
+ Otherwise the ``info date" may be (displayed as) ``unknown."
+ \item
+ |\CheckDateOfPDFmod{wrong.tex}| tests against `wrong.tex''s
+ modification date according to `\pdffilemoddate'---the present
+ package documentation uses \ctanpkgref{pdftex} indeed.
+ \item
+ |\CheckDateOfToday{wrong.tex}| tests against ``today"'s date,
+ which should be different from `2012/10/15'.
+ \item
+ The ``script" terminates on \LaTeX's |\stop| command,
+ without typesetting anything.
+% (or that's what I expect and what has happened when I tried it).
+ \TeX\ is just used as a program, a command interpreter
+ (as with \ctanpkgref{docstrip}).
+\end{enumerate}
+
+% \subsection{The Single Commands}
+% $\dots$ are described below near to their implementation.
+
+% \pagebreak
+
+\section{Implementation and Single Commands}
+\subsection{Package File Header (Legalese)}
+\input{filedate.doc}
+
+\section{Use with Present Package Documentation}
+At this place, the documentation source \qtd{\file{filedate.tex}}
+issues
+\begin{verbatim}
+ \EqualityMessages
+ \CheckDateOfPDFmod{filedate.sty}
+ \CheckDateOfPDFmod{filedate.tex}
+\end{verbatim}
+ \EqualityMessages
+ \CheckDateOfPDFmod{filedate.sty}
+ \CheckDateOfPDFmod{filedate.tex}
+in order to check whether the ``info dates" of the package file
+\qtd{\file{filedate.sty}} and of the documentation source and driver
+\qtd{\file{filedate.tex}} are the same as their modification dates
+according to |\pdffilemoddate| (using \code{pdflatex}).
+When I added this on 2012-10-17, it indeed informed me that I had not updated
+\file{filedate.tex}'s info date
+(\code{2012/10/16},
+ generation of first version of the file from a template, draft).
+
+|\EqualityMessages| confirms that the tests were run indeed.
+
+\end{document}
+
+VERSION HISTORY
+
+2012/10/16 for v0.1 started
+2012/10/17 completed
diff --git a/Master/texmf-dist/source/latex/filedate/srcfiles.tex b/Master/texmf-dist/source/latex/filedate/srcfiles.tex
new file mode 100644
index 00000000000..ce44e72c64e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/filedate/srcfiles.tex
@@ -0,0 +1,15 @@
+\ProvidesFile{srcfiles.tex}[2012/10/16 file infos -> SrcFILEs.txt]
+\RequirePackage{nicefilelist}
+\MFfieldtemplate{f-base}{filedate}
+\RequirePackage{myfilist}
+\EmptyFileList %%% [readprov.sty,myfilist.sty]
+%% packages:
+\ReadPackageInfos{filedate}
+%% documentation:
+\ReadFileInfos{filedate,wrong}
+%% documentation settings and auxiliaries:
+%\ReadPackageInfos{fifinddo,makedoc,niceverb}
+%\ReadFileInfos{makedoc.cfg,mdoccorr.cfg}
+\ReadFileInfos{srcfiles}
+\ListInfos[SrcFILEs.txt]
+