summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/filemod/filemod.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/filemod/filemod.dtx')
-rw-r--r--Master/texmf-dist/source/latex/filemod/filemod.dtx55
1 files changed, 46 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/filemod/filemod.dtx b/Master/texmf-dist/source/latex/filemod/filemod.dtx
index 4f20c19ca3b..f35fa155881 100644
--- a/Master/texmf-dist/source/latex/filemod/filemod.dtx
+++ b/Master/texmf-dist/source/latex/filemod/filemod.dtx
@@ -9,11 +9,11 @@
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is Martin Scharrer.
-%%
+%%
%% This work consists of the files filemod.dtx and filemod.ins
%% and the derived filebase filemod.sty.
%</COPYRIGHT>
@@ -48,7 +48,7 @@
%<package>\ProvidesPackage{filemod}[%
%<expmin>\ProvidesPackage{filemod-expmin}[%
%<*dtx|package|expmin>
- 2011/03/24 v1.1
+ 2011/09/19 v1.2
%</dtx|package|expmin>
%<*dtx|package>
Get and compare file modification times]
@@ -58,11 +58,12 @@
%
%<*dtx>
\documentclass{ydoc}
-\usepackage{filemod}[2011/03/24]
+\usepackage{filemod}[2011/09/19]
\usepackage{multicol}
\usepackage{csquotes}
\usepackage{tgpagella}
\usepackage{dtklogos}
+\protected\def\qq#1{``#1''}
\MakeShortMacroArgs\`\relax
\EnableCrossrefs
\CodelineIndex
@@ -76,7 +77,7 @@
%</dtx>
% \fi
%
-% \CheckSum{765}
+% \CheckSum{787}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -97,6 +98,7 @@
%
% \changes{v1.0}{2011/03/23}{First release}
% \changes{v1.1}{2011/03/24}{Added Lua(La)TeX and plain eTeX support.}
+% \changes{v1.2}{2011/09/19}{Added macros to print filemod date in \cs{today} format.}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -181,6 +183,15 @@
% |\renewcommand*{\thefilemodtime}[4]{\formattime{#1}{#2}{#3}}|
%
%
+% \DescribeMacro{\Filemodtoday}{<\/filename>}
+% Prints the file modification date of the given file in the current format of \Macro\today.
+% For this the compiler date is set locally to the file modification date and then \Macro\today is used to print that date.
+% This takes advantages of any localised definition provided by the \pkg{babel} package or other packages.
+%
+% \DescribeMacro{\FilemodToday}{<\/filename>}
+% Similar to \Macro\FilemodToday but also prints the full file modification date/time using the
+% \Macro\thefilemod format macro.
+% For this the \Macro\thefilemoddate macro is changed locally to use \Macro\today with the file modification date.
%
%
% \subsection{Get File Modification Date and Time as Number}
@@ -215,7 +226,7 @@
%
% \DescribeMacro{\filemodcmp}[<num>]{<\/filename 1>}{<\/filename 2>}{<clause 1>}{<clause 2>}!\optional!{<clause 3>}
% This macro compares the file modification date and time of the two given files and expands to the clause of the
-% newest file. An numerical optional argument can be given to determine the outcome if both files have the exact same
+% newest file. An numerical optional argument can be given to determine the outcome if both files have the exact same
% modification date/time (or both do not exists). If `<num>` is 0, no clause will be expanded, i.e.\ the macro expands
% to an empty text. If `<num>` is 1 (default) or 2 the macro expands to the corresponding clause.
% However if `<num>` is 3, the macro will await a third clause and expands to it if both files modification dates are equal.
@@ -488,7 +499,7 @@
% \iffalse
%<*expmin>
% \fi
-%
+%
% \subsection{Minimal set of expandable Macros}
%
%
@@ -1320,6 +1331,32 @@
% \end{macrocode}
% \end{macro}
%
+%
+% \subsection{Macros to print \qq{today} string}
+%
+% \begin{macro}{\Filemodtoday}
+% \begin{macrocode}
+%<latex>\newcommand*\Filemodtoday[1]%
+%<tex>\def\Filemodtoday#1%
+{{%
+ \def\thefilemod##1##2##3##4##5##6##7{\year##1 \month##2 \day##3 \today}%
+ \filemodprint{#1}%
+}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FilemodToday}
+% \begin{macrocode}
+%<latex>\newcommand*\FilemodToday[1]%
+%<tex>\def\FilemodToday#1%
+{{%
+ \def\thefilemoddate##1##2##3{\year##1 \month##2 \day##3 \today}%
+ \filemodprint{#1}%
+}}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \iffalse
%</exe>
% \fi
@@ -1421,7 +1458,7 @@
% \fi
%
% \subsection{Auxiliary Macros}
-%
+%
% The "Z" characters are changed to catcode 12 because this is how they appear in the string
% returned by `|\pdffilemoddate`.
% \begin{macrocode}