summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-25 22:32:09 +0000
committerKarl Berry <karl@freefriends.org>2011-03-25 22:32:09 +0000
commit3e0da7063ec8c3bfc7455bfe9935bda3d82e9dc5 (patch)
tree5cd6b56bafe2f5d5920fd004bcf34a733343a9f6 /Master
parentcfed44562985f2f168a5b2f6df46bcaec533d7e9 (diff)
filemod (25mar11)
git-svn-id: svn://tug.org/texlive/trunk@21831 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/filemod/README46
-rw-r--r--Master/texmf-dist/doc/latex/filemod/filemod.pdfbin631673 -> 472907 bytes
-rw-r--r--Master/texmf-dist/source/latex/filemod/filemod.dtx333
-rw-r--r--Master/texmf-dist/source/latex/filemod/filemod.ins11
-rw-r--r--Master/texmf-dist/tex/generic/filemod/filemod-expmin.tex91
-rw-r--r--Master/texmf-dist/tex/generic/filemod/filemod.tex386
-rw-r--r--Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty44
-rw-r--r--Master/texmf-dist/tex/latex/filemod/filemod.sty89
8 files changed, 895 insertions, 105 deletions
diff --git a/Master/texmf-dist/doc/latex/filemod/README b/Master/texmf-dist/doc/latex/filemod/README
index 61f1f3455b1..6f48dd2195d 100644
--- a/Master/texmf-dist/doc/latex/filemod/README
+++ b/Master/texmf-dist/doc/latex/filemod/README
@@ -1,15 +1,17 @@
The filemod Package
~~~~~~~~~~~~~~~~~~~
Copyright (C) Martin Scharrer <martin@scharrer-online.de>
-Version v1.0 -- 2011/03/23
This package provides macros to read and compare the modification dates
of files. These files can be .tex files, images or other files as long as they can be
found by the LaTeX compiler. It uses the \pdffilemoddate primitive of pdfLaTeX
to receive the file modification date as PDF date string, parses it and returns
-the value to the user. This package will also work for DVI output with recent
-versions of the LaTeX compiler which uses pdfLTEX in DVI mode. The functionality
-is provided by purely expandable macros or by faster but non-expandable ones.
+the value to the user.
+The functionality is provided by purely expandable macros or by faster but non-expandable ones.
+
+This package will work with LaTeX and plain eTeX as long pdf(La)TeX (in
+PDF or DVI mode) or Lua(La)TeX is used. Xe(La)TeX is not supported because it
+does not provide \pdffilemoddate.
Examples:
% Prints file modification date and time of main file
@@ -18,3 +20,39 @@ Examples:
% Include newest of a set of files:
\input{\filemodNewest{{file1}{file2}{file3}}}
+ % Include newest of a set of images:
+ % (\includegraphics doesn't expand its fully before parsing it)
+ \FilemodNewest{{file1}{file2}{file3}}
+ \includegraphics{\filemodresultfile}
+
+
+REQUIREMENTS:
+=============
+pdflatex v1.30.0 or later is required.
+Alternative LuaTeX can be used together with the `pdftexcmds` package.
+
+
+INSTALLATION:
+=============
+Compile the DTX file (with included INS file) through pdflatex:
+
+ pdflatex filemod.dtx
+ pdflatex filemod.dtx
+ pdflatex filemod.dtx
+
+Copy the files to the following directories which must be created beforehand.
+Example for a Unix/Linux OS, change accordantly for MS Windows and Mac, e.g.
+copy it using a graphics interface.
+
+ cp filemod*.sty ${TEXMF}/tex/latex/filemod/
+ cp filemod*.tex ${TEXMF}/tex/generic/filemod/
+
+OPTIONAL:
+The documentation can be installed by:
+ cp filemod.pdf README ${TEXMF}/doc/latex/filemod/
+
+The source can be installed by:
+ cp filemod.dtx ${TEXMF}/source/latex/filemod/
+
+The TEXMF is /usr/local/texlive/2010/texmf-dist, ${HOME}/texmf or similar.
+
diff --git a/Master/texmf-dist/doc/latex/filemod/filemod.pdf b/Master/texmf-dist/doc/latex/filemod/filemod.pdf
index 33f844aa323..fc3a9d4f7c4 100644
--- a/Master/texmf-dist/doc/latex/filemod/filemod.pdf
+++ b/Master/texmf-dist/doc/latex/filemod/filemod.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/filemod/filemod.dtx b/Master/texmf-dist/source/latex/filemod/filemod.dtx
index 7ec285e7c26..4f20c19ca3b 100644
--- a/Master/texmf-dist/source/latex/filemod/filemod.dtx
+++ b/Master/texmf-dist/source/latex/filemod/filemod.dtx
@@ -28,8 +28,10 @@
\keepsilent
\askforoverwritefalse
\generate{%
- \file{filemod.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,package,parse,exp,exe,display,aux}}%
- \file{filemod-expmin.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,expmin}}%
+ \file{filemod.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,package,parse,exp,exe,display,aux,latex}}%
+ \file{filemod.tex} {\nopreamble\from{filemod.dtx} {COPYRIGHT,package,parse,exp,exe,display,aux,tex}}%
+ \file{filemod-expmin.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,expmin,latex}}%
+ \file{filemod-expmin.tex} {\nopreamble\from{filemod.dtx} {COPYRIGHT,expmin,tex}}%
}
%</install>
%<install>\endbatchfile
@@ -42,21 +44,25 @@
%<*dtx>
\ProvidesFile{filemod.dtx}[%
%</dtx>
+%<*latex>
%<package>\ProvidesPackage{filemod}[%
%<expmin>\ProvidesPackage{filemod-expmin}[%
%<*dtx|package|expmin>
- 2011/03/23 v1.0
+ 2011/03/24 v1.1
%</dtx|package|expmin>
%<*dtx|package>
Get and compare file modification times]
%</dtx|package>
%<expmin> Get and compare file modification times (expandable; minimal)]
+%</latex>
%
%<*dtx>
\documentclass{ydoc}
-\usepackage{filemod}[2011/03/23]
+\usepackage{filemod}[2011/03/24]
\usepackage{multicol}
\usepackage{csquotes}
+\usepackage{tgpagella}
+\usepackage{dtklogos}
\MakeShortMacroArgs\`\relax
\EnableCrossrefs
\CodelineIndex
@@ -70,7 +76,7 @@
%</dtx>
% \fi
%
-% \CheckSum{566}
+% \CheckSum{765}
%
% \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
@@ -90,6 +96,7 @@
%
%
% \changes{v1.0}{2011/03/23}{First release}
+% \changes{v1.1}{2011/03/24}{Added Lua(La)TeX and plain eTeX support.}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -99,12 +106,13 @@
% \maketitle
%
% \begin{abstract}
-% This package provides macros to read and compare the modification dates of files.
-% These files can be |.tex| files, images or other files as long as they can be found by the \LaTeX\ compiler.
-% It uses the |\pdffilemoddate| primitive of pdf\LaTeX\ to receive the file modification date as PDF
-% date string, parses it and returns the value to the user.
-% This package will also work for DVI output with recent versions of the \LaTeX\ compiler which uses pdf\LaTeX\ in DVI mode.
+% This package provides macros to read and compare the modification dates of files. These files can be |.tex| files,
+% images or other files as long as they can be found by the \LaTeX\ compiler. It uses the |\pdffilemoddate| primitive
+% of pdf\LaTeX\ to receive the file modification date as PDF date string, parses it and returns the value to the user.
% The functionality is provided by purely expandable macros or by faster but non-expandable ones.
+%
+% This package will work with \LaTeX{} and plain \eTeX{} as long pdf\LaTeXTeX{} (in PDF or DVI mode) or Lua\LaTeXTeX{}
+% is used. \XeTeX{} is not supported because it does not provide |\pdffilemoddate|.
% \end{abstract}
%
% \begin{multicols}{2}
@@ -112,26 +120,32 @@
% \end{multicols}
%
% \section{Introduction}
-% This package provides several macros to read and compare the modification dates of files.
-% The same functionality is provided by two groups of macros:
-% The macros of the first group all start with a lower case letter and are fully expandable.
-% This means they can be used in places where a string must be provided, like in `|\input` or `|\includegraphics`.
-% Because assignments are not expandable some of these macros, like the ones for comparisons, need to reread and re-parse the
-% file modification dates if they are required in more than one place inside the macro.
-%
-% The macros of the second group all start with a upper case letter and are not expandable because assignments are used internally.
-% However, this allows techniques which speed up the processing of these macros, making this macros faster than the expandable counterparts.
-% If expandability is not required these macros should be preferred.
+% This package provides several macros to read and compare the modification dates of files. The same functionality is
+% provided by two groups of macros: The macros of the first group all start with a lower case letter and are fully
+% expandable. This means they can be used in places where a string must be provided, like in `|\input`. Because
+% assignments are not expandable some of these macros, like the ones for comparisons, need to reread and re-parse the
+% file modification dates if they are required in more than one place inside the macro. The macros of the second group
+% all start with a upper case letter and are not expandable because assignments are used internally. However, this
+% allows techniques which speed up the processing of these macros, making this macros faster than the expandable
+% counterparts. If expandability is not required these macros should be preferred.
%
%
% \section{Usage}
-% The following macros are provided by this package:
+% This package can be loaded with \LaTeX{} using |\usepackage{filemod}| as usual.
+% With plain \eTeX{} it can be loaded using |\input filemod|.
+% Some required internal \LaTeX{} macros (like |\@gobble|, |\@firstofone|, etc.) are then defined.
+%
+% A minimal set of expandable macros for the comparison of file modification dates is provided by the sub-package
+% \pkg{filemod-expmin}. It is useful for other packages which need this functionality but don't like to load the whole package.
+% It can be loaded using |\usepackage{filemod-expmin}| (or |\RequirePackage|) or |\input filemod-expmin|, respectively.
+%
%
% \subsection{Print File Modification Date and Time}
-% The following macros can be used to print (i.e.\ typeset) the file modification date and time of files in the document.
-% The \Macro\formatdate and \Macro\formattime macros of the \pkg{datetime}\footnote{CTAN: \url{http://www.ctan.org/pkg/datetime}} can be used in addition to format the dates and times
-% in a language specific format.
-% See also the \pkg{getfiledate}\footnote{CTAN: \url{http://www.ctan.org/pkg/getfiledate}} package which also prints file modification dates including adding fancy frames around it.
+% The following macros can be used to print (i.e.\ typeset) the file modification date and time of files in the
+% document. The \Macro\formatdate and \Macro\formattime macros of the \pkg{datetime}\footnote{CTAN:
+% \url{http://www.ctan.org/pkg/datetime}} can be used in addition to format the dates and times in a language specific
+% format. See also the \pkg{getfiledate}\footnote{CTAN: \url{http://www.ctan.org/pkg/getfiledate}} package which also
+% prints file modification dates including adding fancy frames around it.
%
% \DescribeMacro{\filemodprint}{<\/filename>}
% Prints the file modifications date and time using `|\filemodparse` and `|\thefilemod`.
@@ -296,11 +310,14 @@
%
%
% \subsection{Parsing of the file modification date}
-% The format returned by the |\pdffilemoddate| primitive is \enquote{\texttt{D:}} followed by a number in the format \enquote{\texttt{YYYYMMDDHHmmSST}} which needs to be parsed before
-% it is useful. The letters have the following meaning: \texttt{Y} = year, \texttt{M} = month, \texttt{D} = day, \texttt{H} = hour, \texttt{mm} = minutes, \texttt{S} = seconds, \texttt{T} or \texttt{TZ} = timezone string. The number of letters indicates the length except for the timezone which is of variable length.
-% An example is \enquote{\texttt{\pdffilemoddate{\jobname.dtx}}} which is the file modification date of the source file of this manual.
-% Unfortunately this number is to large for TeX to be taken as an integer for numerical comparisons, so it is broken into two numbers (\texttt{YYYYMMDD} and \texttt{HHmmSS}) which are compared
-% in multiple steps.
+% The format returned by the |\pdffilemoddate| primitive is \enquote{\texttt{D:}} followed by a number in the format
+% \enquote{\texttt{YYYYMMDDHHmmSST}} which needs to be parsed before it is useful. The letters have the following
+% meaning: \texttt{Y} = year, \texttt{M} = month, \texttt{D} = day, \texttt{H} = hour, \texttt{mm} = minutes, \texttt{S}
+% = seconds, \texttt{T} or \texttt{TZ} = timezone string. The number of letters indicates the length except for the
+% timezone which is of variable length. An example is \enquote{\texttt{\pdffilemoddate{\jobname.dtx}}} which is the
+% file modification date of the source file of this manual. Unfortunately this number is to large for TeX to be taken
+% as an integer for numerical comparisons, so it is broken into two numbers (\texttt{YYYYMMDD} and \texttt{HHmmSS})
+% which are compared in multiple steps.
%
% \DescribeMacro{\filemodparse}{<macro>}{<\/filename>}
% Parses the file modification datetime of the given file and passes the result to the given macro.
@@ -341,6 +358,47 @@
% \section{Implementation}
%
% \iffalse
+%<*package|expmin>
+% \fi
+%
+% Ensure correct catcode for plainTeX:
+% \begin{macrocode}
+%<*tex>
+\expandafter\edef\csname filemod@cat\endcsname{\noexpand\catcode`\noexpand\@=\the\catcode`\@\relax}
+\catcode`\@=11
+%</tex>
+% \end{macrocode}
+%
+% Check if the \Macro\pdffilemoddate command is available. If not (e.g.\ with LuaLaTeX) the \pkg{pdftexcmds} is loaded
+% to provide the \Macro\pdf@filemoddate replacement. However for XeLaTeX this will fail and an error is raised.
+% \begin{macrocode}
+\ifx\filemod@directtrue\@undefined
+\csname newif\expandafter\endcsname\csname iffilemod@direct\endcsname
+\filemod@directtrue
+\ifx\pdffilemoddate\@undefined
+%<latex> \RequirePackage{pdftexcmds}
+%<tex> \input pdftexcmds.sty
+ \filemod@directfalse
+ \ifx\pdf@filemoddate\@undefined
+ \edef\filemod@help
+ {The required command \string\pdffilemoddate\space is not defined.
+ This means that the used\space\space LaTeX compiler does not support it.
+ Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
+ XeLaTeX does not support reading file modification\space\space dates.
+ }%
+%<latex> \PackageError{filemod}{Required command \string\pdffilemoddate\space is not defined!}{\filemod@help}
+%<tex> \errhelp\expandafter{\filemod@help}
+%<tex> \errmessage{filemod package: Required command \string\pdffilemoddate\space is not defined!}
+ \fi
+\fi
+\fi
+% \end{macrocode}
+%
+% \iffalse
+%</package|expmin>
+% \fi
+%
+% \iffalse
%<*parse>
% \fi
% \subsection{Parser}
@@ -349,9 +407,17 @@
%
% \begin{macro}{\filemodparse}[2]{Macro or tokens to process result}{file name}
% \begin{macrocode}
-\newcommand*\filemodparse[2]{%
+%<latex>\newcommand*\filemodparse{}
+\iffilemod@direct
+\def\filemodparse#1#2{%
\expandafter\filemod@parse\pdffilemoddate{#2}\relax{#1}%
}
+\else
+\def\filemodparse#1#2{%
+ \expandafter\expandafter
+ \expandafter\filemod@parse\pdf@filemoddate{#2}\relax{#1}%
+}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -376,9 +442,9 @@
% returned by `|\pdffilemoddate`.
% \begin{macrocode}
\begingroup
-\@makeother\D
-\@makeother\Z
-\@makeother:
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
% \end{macrocode}
%
% \begin{macro}{\filemod@parse@}[9]{Y1}{Y2}{Y3}{Y4}{M1}{M2}{D1}{D2}{Rest}
@@ -393,6 +459,7 @@
% \begin{macro}{\filemodnotexists}[1]{Macro provided to \Macro\filemodparse}
% Macro which is used for non-existing files.
% \begin{macrocode}
+%<latex>\newcommand*\filemodnotexists{}
\gdef\filemodnotexists#1{%
#1{0000}{00}{00}{00}{00}{00}{Z}%
}
@@ -429,16 +496,24 @@
% returned by `|\pdffilemoddate`.
% \begin{macrocode}
\begingroup
-\@makeother\D
-\@makeother\Z
-\@makeother:
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
% \end{macrocode}
%
% \begin{macro}{\filemodNumdate}
% \begin{macrocode}
+%<latex>\newcommand*\filemodNumdate{}
+\iffilemod@direct
\gdef\filemodNumdate#1{%
\expandafter\filemod@Numdate\pdffilemoddate{#1}D:00000000000000Z\relax
}
+\else
+\gdef\filemodNumdate#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numdate\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -452,9 +527,17 @@
%
% \begin{macro}{\filemodNumtime}
% \begin{macrocode}
+%<latex>\newcommand*\filemodNumtime{}
+\iffilemod@direct
\gdef\filemodNumtime#1{%
\expandafter\filemod@Numtime\pdffilemoddate{#1}D:00000000000000Z\relax
}
+\else
+\gdef\filemodNumtime#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numtime\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -480,7 +563,9 @@
%
% \begin{macro}{\filemodCmp}
% \begin{macrocode}
-\newcommand*\filemodCmp[2]{%
+%<latex>\newcommand*\filemodCmp[2]%
+%<tex>\def\filemodCmp#1#2%
+{%
\ifcase0%
\ifnum\filemodNumdate{#2}>\filemodNumdate{#1} 1\else
\ifnum\filemodNumdate{#2}=\filemodNumdate{#1} %
@@ -496,6 +581,15 @@
% \end{macrocode}
% \end{macro}
%
+%
+% Some required \LaTeX{} macros for the plain\TeX{} version:
+% \begin{macrocode}
+%<*tex>
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+%</tex>
+% \end{macrocode}
+%
% \iffalse
%</expmin>
% \fi
@@ -504,7 +598,8 @@
%<*package>
% \fi
% \begin{macrocode}
-\RequirePackage{filemod-expmin}
+%<latex>\RequirePackage{filemod-expmin}
+%<tex>\input filemod-expmin
% \end{macrocode}
% \iffalse
%</package>
@@ -522,7 +617,9 @@
% \begin{macro}{\filemodnumdate}
% Simply calls the parse macro.
% \begin{macrocode}
-\newcommand*\filemodnumdate{\filemodparse\filemod@numdate}
+%<latex>\newcommand*%
+%<tex>\def
+\filemodnumdate{\filemodparse\filemod@numdate}
% \end{macrocode}
% \end{macro}
%
@@ -539,7 +636,9 @@
% \begin{macro}{\filemodnumtime}
% Simply calls the parse macro.
% \begin{macrocode}
-\newcommand*\filemodnumtime{\filemodparse\filemod@numtime}
+%<latex>\newcommand*%
+%<tex>\def
+\filemodnumtime{\filemodparse\filemod@numtime}
% \end{macrocode}
% \end{macro}
%
@@ -556,20 +655,24 @@
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Optional argument handler}
%
-% \begin{macro}{\filemod@opt}[3]{Macro to read optional argument when present}{Next macro which receives default optional argument as first normal argument}{\texttt{[} or first mandatory argument}
-% This macro checks if an optional argument is present. Here |#1| and |#2| are handlers and |#3| is the first balanced text which followed the macro, i.e.\ either "[" or the first
-% mandatory argument.
+% \begin{macro}{\filemod@opt}[3]{Macro to read optional argument when present}{Next macro which receives default
+% optional argument as first normal argument}{\texttt{[} or first mandatory argument}
+% This macro checks if an optional argument is present. Here |#1| and |#2| are handlers and |#3| is the first balanced
+% text which followed the macro, i.e.\ either "[" or the first mandatory argument.
% The |\ifx| compares "[" and the first token of |#3|. There are three possible cases:
% \begin{enumerate}
-% \item If they do not match everything until and including |\else| is skipped.
-% Then |\remove@to@nnil@exec| is expanded which removes the following |\@nnil|. This leaves |\empty| and the rest of the \emph{false} clause.
-% The |\fi| is removed using |\expandafter| and the trailing |{#3}| is read by |#2| as normal argument.
-% \item If |#3| is exactly "[" the |\ifx[#3| part is removed by \TeX. The |\remove@to@nnil@exec| removes the |\@nnil| and the |\remove@to@nnil| because there was nothing before |\@nnil|.
-% Therefore |\expandafter#1| is executed which triggers |\else| which removes everything up to and including |\fi|.
-% Then the optional argument handler |#1| is expanded which receives the "[" as "{[}" which is then gobbled.
-% \item The |#3| starts with "[" but contains more material, i.e.\ was original a mandatory argument. Then |\ifx| expands to the \emph{true} clause and removes
-% the first token of |#3|. The |\remove@to@nnil@exec| gobbles the rest of |#3| but reads and reinserts |\remove@to@nnil| which gobbles everything to the next |\@nnil|
-% after |\else| and therefore jumps to the \emph{false} clause. This clause is executed like normal, i.e.\ |#2| is called with the default optional argument and |{#3}| as second argument.
+% \item If they do not match everything until and including |\else| is skipped. Then |\remove@to@nnil@exec| is
+% expanded which removes the following |\@nnil|. This leaves |\empty| and the rest of the \emph{false} clause. The
+% |\fi| is removed using |\expandafter| and the trailing |{#3}| is read by |#2| as normal argument.
+% \item If |#3| is exactly "[" the |\ifx[#3| part is removed by \TeX. The |\remove@to@nnil@exec| removes the |\@nnil|
+% and the |\remove@to@nnil| because there was nothing before |\@nnil|. Therefore |\expandafter#1| is executed which
+% triggers |\else| which removes everything up to and including |\fi|. Then the optional argument handler |#1| is
+% expanded which receives the "[" as "{[}" which is then gobbled.
+% \item The |#3| starts with "[" but contains more material, i.e.\ was original a mandatory argument. Then |\ifx|
+% expands to the \emph{true} clause and removes the first token of |#3|. The |\remove@to@nnil@exec| gobbles the rest
+% of |#3| but reads and reinserts |\remove@to@nnil| which gobbles everything to the next |\@nnil| after |\else| and
+% therefore jumps to the \emph{false} clause. This clause is executed like normal, i.e.\ |#2| is called with the
+% default optional argument and |{#3}| as second argument.
% \end{enumerate}
% \begin{macrocode}
\def\filemod@opt#1#2#3{%
@@ -607,7 +710,9 @@
% Compare two file mod dates.
% Calls macros to check for an optional argument in an expandable way.
% \begin{macrocode}
-\newcommand*\filemodcmp{%
+%<latex>\newcommand*%
+%<tex>\def
+\filemodcmp{%
\filemod@opt\filemod@cmp@opt\filemod@cmp
}
% \end{macrocode}
@@ -617,7 +722,9 @@
% \begin{macro}{\filemodoptdefault}
% The default optional argument which is used if none is provided.
% \begin{macrocode}
-\newcommand*\filemodoptdefault{1}
+%<latex>\newcommand*%
+%<tex>\def
+\filemodoptdefault{1}
% \end{macrocode}
% \end{macro}
%
@@ -693,6 +800,17 @@
% \end{macrocode}
% \end{macro}
%
+% Some required \LaTeX{} macros for the plain\TeX{} version:
+% \begin{macrocode}
+%<*tex>
+\long\def\@thirdofthree#1#2#3{#3}
+\long\def\@gobble#1{}
+\long\def\@gobbletwo#1#2{}
+\def\remove@to@nnil#1\@nnil{}
+%</tex>
+% \end{macrocode}
+%
+%
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -702,7 +820,9 @@
% \begin{macro}{\filemodnewest}
% First a macro is called to handle an optional argument in an expandable way.
% \begin{macrocode}
-\newcommand*\filemodnewest{%
+%<latex>\newcommand*%
+%<tex>\def
+\filemodnewest{%
\filemod@opt\filemod@newest@opt\filemod@newest
}
% \end{macrocode}
@@ -734,7 +854,9 @@
% \begin{macro}{\filemodoldest}
% First a macro is called to handle an optional argument in an expandable way.
% \begin{macrocode}
-\newcommand*\filemodoldest{%
+%<latex>\newcommand*%
+%<tex>\def
+\filemodoldest{%
\filemod@opt\filemod@oldest@opt\filemod@oldest
}
% \end{macrocode}
@@ -768,7 +890,7 @@
% \begin{macro}{\filemodNewest}[1]{Tokens between macros and opening brace}
% Checks for an optional argument and substitutes the default if it is missing.
% \begin{macrocode}
-\newcommand*\filemodNewest{}
+%<latex>\newcommand*\filemodNewest{}
\def\filemodNewest#1#{%
\expandafter\expandafter
\expandafter\@filemodNewest
@@ -794,7 +916,7 @@
% This is done for the benefit of expansion speed versus memory usage.
% Future versions might use common code instead.
% \begin{macrocode}
-\newcommand*\filemodOldest{}
+%<latex>\newcommand*\filemodOldest{}
\def\filemodOldest#1#{%
\expandafter\expandafter
\expandafter\@filemodOldest
@@ -945,7 +1067,9 @@
%
% \begin{macro}{\Filemodgetnum}
% \begin{macrocode}
-\newcommand*\Filemodgetnum{\filemodparse\Filemod@getnum}
+%<latex>\newcommand*%
+%<tex>\def
+\Filemodgetnum{\filemodparse\Filemod@getnum}
% \end{macrocode}
% \end{macro}
%
@@ -967,10 +1091,12 @@
% \begin{macro}{\Filemodcmp}[1]{Optional argument (default: "1")}
% Calls \Macro\Filemod@cmp to execute the result at the end.
% \begin{macrocode}
+%<*latex>
\newcommand\Filemodcmp[1][1]{%
\def\filemod@next{\filemodcmpresult}%
\Filemod@cmp{#1}%
}
+%</latex>
% \end{macrocode}
% \end{macro}
%
@@ -979,10 +1105,12 @@
% Calls \Macro\Filemod@cmp to not execute the result at the end.
% Instead the user must use \Macro\filemodcmpresult explicitly.
% \begin{macrocode}
+%<*latex>
\newcommand\FilemodCmp[1][1]{%
\let\filemod@next\empty
\Filemod@cmp{#1}%
}
+%</latex>
% \end{macrocode}
% \end{macro}
%
@@ -1055,10 +1183,38 @@
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Compare file mod times and return file name}
%
+% Handlers for optional arguments for plain\TeX{}.
+% If none is provided the \Macro\filemodoptdefault is used.
+% \begin{macrocode}
+%<*tex>
+\def\filemod@chkopt#1{%
+ \def\filemod@optcmd{#1}%
+ \futurelet\filemod@tok\filemod@@chkopt
+}
+\def\filemod@@chkopt{%
+ \ifx[\filemod@tok
+ \expandafter\filemod@readopt
+ \else
+ \expandafter\filemod@optcmd
+ \expandafter\filemodoptdefault
+ \fi
+}
+\def\filemod@readopt[#1]{%
+ \filemod@optcmd{#1}%
+}
+%</tex>
+% \end{macrocode}
+%
% \begin{macro}{\Filemodnewest}
% Simply uses \Macro\FilemodNewest.
% \begin{macrocode}
+%<*latex>
\newcommand*\Filemodnewest[3][\filemodoptdefault]{\FilemodNewest[{#1}]{{#2}{#3}}}
+%</latex>
+%<*tex>
+\def\Filemodnewest{\filemod@chkopt\Filemod@newest}
+\def\Filemod@newest#1#2#3{\Filemod@Newest{#1}{{#2}{#3}}}
+%</tex>
% \end{macrocode}
% \end{macro}
%
@@ -1066,7 +1222,13 @@
% \begin{macro}{\Filemodoldest}
% Simply uses \Macro\FilemodOldest.
% \begin{macrocode}
+%<*latex>
\newcommand*\Filemodoldest[3][\filemodoptdefault]{\FilemodOldest[{#1}]{{#2}{#3}}}
+%</latex>
+%<*tex>
+\def\Filemodoldest{\filemod@chkopt\Filemod@oldest}
+\def\Filemod@oldest#1#2#3{\Filemod@Oldest{#1}{{#2}{#3}}}
+%</tex>
% \end{macrocode}
% \end{macro}
%
@@ -1076,7 +1238,10 @@
% Uses \Macro\Filemod@est with a different compare sign.
% Stores the optional argument for later processing. This avoids the need to pass it around as an argument.
% \begin{macrocode}
-\newcommand*\FilemodNewest[2][\filemodoptdefault]{%
+%<latex>\newcommand*\FilemodNewest[2][\filemodoptdefault]%
+%<tex>\def\FilemodNewest{\filemod@chkopt\Filemod@Newest}
+%<tex>\def\Filemod@Newest#1#2%
+{%
\def\filemode@tie{#1}%
\def\filemod@gl{>}%
\Filemod@est#2\filemod@end
@@ -1089,7 +1254,10 @@
% Uses \Macro\Filemod@est with a different compare sign.
% Stores the optional argument for later processing. This avoids the need to pass it around as an argument.
% \begin{macrocode}
-\newcommand*\FilemodOldest[2][\filemodoptdefault]{%
+%<latex>\newcommand*\FilemodOldest[2][\filemodoptdefault]%
+%<tex>\def\FilemodOldest{\filemod@chkopt\Filemod@Oldest}
+%<tex>\def\Filemod@Oldest#1#2%
+{%
\def\filemode@tie{#1}%
\def\filemod@gl{<}%
\Filemod@est#2\filemod@end
@@ -1165,28 +1333,36 @@
%
% \begin{macro}{\filemodprint}
% \begin{macrocode}
-\newcommand*\filemodprint{\filemodparse\thefilemod}
+%<latex>\newcommand*
+%<tex>\def
+\filemodprint{\filemodparse\thefilemod}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\filemodprintdate}
% \begin{macrocode}
-\newcommand*\filemodprintdate{\filemodparse\the@filemoddate}
+%<latex>\newcommand*
+%<tex>\def
+\filemodprintdate{\filemodparse\the@filemoddate}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\filemodprinttime}
% \begin{macrocode}
-\newcommand*\filemodprinttime{\filemodparse\the@filemodtime}
+%<latex>\newcommand*
+%<tex>\def
+\filemodprinttime{\filemodparse\the@filemodtime}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\thefilemod}
% \begin{macrocode}
-\newcommand*\thefilemod[7]{%
+%<latex>\newcommand*\thefilemod[7]%
+%<tex>\def\thefilemod#1#2#3#4#5#6#7%
+{%
\thefilemoddate{#1}{#2}{#3}%
\filemodsep
\thefilemodtime{#4}{#5}{#6}{#7}%
@@ -1195,21 +1371,24 @@
% \end{macro}
%
% \begin{macrocode}
-\let\filemodsep\space
+%<latex>\newcommand*\filemodsep{ }
+%<tex>\let\filemodsep\space
% \end{macrocode}
%
% \begin{macro}{\thefilemoddate}
% \begin{macrocode}
-\newcommand*\thefilemoddate[3]{%
- #1/#2/#3%
-}
+%<latex>\newcommand*\thefilemoddate[3]%
+%<tex>\def\thefilemoddate#1#2#3%
+{#1/#2/#3}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\thefilemodtime}
% \begin{macrocode}
-\newcommand*\thefilemodtime[4]{%
+%<latex>\newcommand*\thefilemodtime[4]%
+%<tex>\def\thefilemodtime#1#2#3#4%
+{%
#1:#2:#3~#4%
}
% \end{macrocode}
@@ -1246,8 +1425,10 @@
% The "Z" characters are changed to catcode 12 because this is how they appear in the string
% returned by `|\pdffilemoddate`.
% \begin{macrocode}
+%<latex>\newcommand*\filemodZ{}
+%<latex>\newcommand*\filemodz{}
\begingroup
-\@makeother\D
+\catcode`\D=12
% \end{macrocode}
%
% \begin{macro}{\filemodZ}
@@ -1273,5 +1454,13 @@
%</aux>
% \fi
%
+% Restore catcode for plainTeX:
+% \begin{macrocode}
+%<*tex>
+\filemod@cat
+\expandafter\let\csname filemod@cat\endcsname\relax
+%</tex>
+% \end{macrocode}
+%
% \Finale
% \endinput
diff --git a/Master/texmf-dist/source/latex/filemod/filemod.ins b/Master/texmf-dist/source/latex/filemod/filemod.ins
new file mode 100644
index 00000000000..10115442744
--- /dev/null
+++ b/Master/texmf-dist/source/latex/filemod/filemod.ins
@@ -0,0 +1,11 @@
+% This INS file is also part of the DTX file
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\generate{%
+ \file{filemod.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,package,parse,exp,exe,display,aux,latex}}%
+ \file{filemod.tex} {\nopreamble\from{filemod.dtx} {COPYRIGHT,package,parse,exp,exe,display,aux,tex}}%
+ \file{filemod-expmin.sty} {\nopreamble\from{filemod.dtx} {COPYRIGHT,expmin,latex}}%
+ \file{filemod-expmin.tex} {\nopreamble\from{filemod.dtx} {COPYRIGHT,expmin,tex}}%
+}
+\endbatchfile
diff --git a/Master/texmf-dist/tex/generic/filemod/filemod-expmin.tex b/Master/texmf-dist/tex/generic/filemod/filemod-expmin.tex
new file mode 100644
index 00000000000..5affd950122
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/filemod/filemod-expmin.tex
@@ -0,0 +1,91 @@
+%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer-online.de>
+%% ---------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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.
+\expandafter\edef\csname filemod@cat\endcsname{\noexpand\catcode`\noexpand\@=\the\catcode`\@\relax}
+\catcode`\@=11
+\ifx\filemod@directtrue\@undefined
+\csname newif\expandafter\endcsname\csname iffilemod@direct\endcsname
+\filemod@directtrue
+\ifx\pdffilemoddate\@undefined
+ \input pdftexcmds.sty
+ \filemod@directfalse
+ \ifx\pdf@filemoddate\@undefined
+ \edef\filemod@help
+ {The required command \string\pdffilemoddate\space is not defined.
+ This means that the used\space\space LaTeX compiler does not support it.
+ Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
+ XeLaTeX does not support reading file modification\space\space dates.
+ }%
+ \errhelp\expandafter{\filemod@help}
+ \errmessage{filemod package: Required command \string\pdffilemoddate\space is not defined!}
+ \fi
+\fi
+\fi
+\begingroup
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
+\iffilemod@direct
+\gdef\filemodNumdate#1{%
+ \expandafter\filemod@Numdate\pdffilemoddate{#1}D:00000000000000Z\relax
+}
+\else
+\gdef\filemodNumdate#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numdate\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
+\gdef\filemod@Numdate D:#1#2#3#4#5#6#7#8#9\relax{%
+ #1#2#3#4#5#6#7#8%
+}
+\iffilemod@direct
+\gdef\filemodNumtime#1{%
+ \expandafter\filemod@Numtime\pdffilemoddate{#1}D:00000000000000Z\relax
+}
+\else
+\gdef\filemodNumtime#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numtime\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
+\gdef\filemod@Numtime D:#1#2#3#4#5#6#7#8#9\relax{%
+ \filemod@@Numtime#9\relax
+}
+\gdef\filemod@@Numtime#1#2#3#4#5#6#7\relax{%
+ #1#2#3#4#5#6%
+}
+\endgroup
+\def\filemodCmp#1#2%
+{%
+ \ifcase0%
+ \ifnum\filemodNumdate{#2}>\filemodNumdate{#1} 1\else
+ \ifnum\filemodNumdate{#2}=\filemodNumdate{#1} %
+ \ifnum\filemodNumtime{#2}>\filemodNumtime{#1} 1\fi
+ \fi
+ \fi
+ \space
+ \expandafter\@firstoftwo
+ \or
+ \expandafter\@secondoftwo
+ \fi
+}
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+\filemod@cat
+\expandafter\let\csname filemod@cat\endcsname\relax
+\endinput
+%%
+%% End of file `filemod-expmin.tex'.
diff --git a/Master/texmf-dist/tex/generic/filemod/filemod.tex b/Master/texmf-dist/tex/generic/filemod/filemod.tex
new file mode 100644
index 00000000000..26eb5679a1e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/filemod/filemod.tex
@@ -0,0 +1,386 @@
+%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer-online.de>
+%% ---------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% 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.
+\expandafter\edef\csname filemod@cat\endcsname{\noexpand\catcode`\noexpand\@=\the\catcode`\@\relax}
+\catcode`\@=11
+\ifx\filemod@directtrue\@undefined
+\csname newif\expandafter\endcsname\csname iffilemod@direct\endcsname
+\filemod@directtrue
+\ifx\pdffilemoddate\@undefined
+ \input pdftexcmds.sty
+ \filemod@directfalse
+ \ifx\pdf@filemoddate\@undefined
+ \edef\filemod@help
+ {The required command \string\pdffilemoddate\space is not defined.
+ This means that the used\space\space LaTeX compiler does not support it.
+ Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
+ XeLaTeX does not support reading file modification\space\space dates.
+ }%
+ \errhelp\expandafter{\filemod@help}
+ \errmessage{filemod package: Required command \string\pdffilemoddate\space is not defined!}
+ \fi
+\fi
+\fi
+\iffilemod@direct
+\def\filemodparse#1#2{%
+ \expandafter\filemod@parse\pdffilemoddate{#2}\relax{#1}%
+}
+\else
+\def\filemodparse#1#2{%
+ \expandafter\expandafter
+ \expandafter\filemod@parse\pdf@filemoddate{#2}\relax{#1}%
+}
+\fi
+\def\filemod@parse#1\relax#2{%
+ \ifx\relax#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\filemodnotexists{#2}}%
+ {\filemod@parse@#1\empty{#2}\relax}%
+}
+\begingroup
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
+\gdef\filemod@parse@ D:#1#2#3#4#5#6#7#8#9\relax{%
+ \filemod@parse@@{{#1#2#3#4}{#5#6}{#7#8}}#9\relax
+}
+\gdef\filemodnotexists#1{%
+ #1{0000}{00}{00}{00}{00}{00}{Z}%
+}
+\endgroup
+\def\filemod@parse@@#1#2#3#4#5#6#7#8\empty#9\relax{%
+ #9#1{#2#3}{#4#5}{#6#7}{#8}%
+}
+\input filemod-expmin
+\def
+\filemodnumdate{\filemodparse\filemod@numdate}
+\def\filemod@numdate#1#2#3#4#5#6#7{#1#2#3}
+\def
+\filemodnumtime{\filemodparse\filemod@numtime}
+\def\filemod@numtime#1#2#3#4#5#6#7{#4#5#6}
+\def\filemod@opt#1#2#3{%
+ \expandafter
+ \remove@to@nnil@exec
+ \ifx[#3\@nnil\remove@to@nnil
+ \expandafter#1%
+ \else\@nnil\empty
+ \expandafter#2%
+ \expandafter\filemodoptdefault
+ \fi
+ {#3}%
+}
+\def\remove@to@nnil@exec#1\@nnil#2{%
+ \ifx\@nnil#1\@nnil\else
+ \expandafter#2
+ \fi
+}
+\def
+\filemodcmp{%
+ \filemod@opt\filemod@cmp@opt\filemod@cmp
+}
+\def
+\filemodoptdefault{1}
+\def\filemod@cmp@opt#1#2]{%
+ \filemod@cmp{#2}%
+}
+\def\filemod@cmp{\filemod@@cmp>}
+\def\filemod@@cmp#1#2#3#4{%
+ \ifcase0%
+ \ifnum\filemodnumdate{#4}#1\filemodnumdate{#3} 1\else
+ \ifnum\filemodnumdate{#4}=\filemodnumdate{#3} %
+ \ifnum\filemodnumtime{#4}#1\filemodnumtime{#3} 1\else
+ \ifnum\filemodnumtime{#4}=\filemodnumtime{#3} 2\fi
+ \fi
+ \fi
+ \fi
+ \space
+ \csname @firstoft\ifnum#2>2 hree\else wo\fi\expandafter\endcsname
+ \or
+ \csname @secondoft\ifnum#2>2 hree\else wo\fi\expandafter\endcsname
+ \else
+ \csname @%
+ \ifcase#2%
+ gobbletwo%
+ \or
+ firstoftwo%
+ \or
+ secondoftwo%
+ \else
+ thirdofthree%
+ \fi
+ \expandafter
+ \endcsname
+ \fi
+}
+\long\def\@firstofthree#1#2#3{#1}
+\long\def\@secondofthree#1#2#3{#2}
+\long\def\@thirdofthree#1#2#3{#3}
+\long\def\@gobble#1{}
+\long\def\@gobbletwo#1#2{}
+\def\remove@to@nnil#1\@nnil{}
+\def
+\filemodnewest{%
+ \filemod@opt\filemod@newest@opt\filemod@newest
+}
+\def\filemod@newest@opt#1#2]{%
+ \filemod@newest{#2}%
+}
+\def\filemod@newest#1#2#3{%
+ \filemod@@cmp>{#1}{#2}{#3}{#2}{#3}%
+}
+\def
+\filemodoldest{%
+ \filemod@opt\filemod@oldest@opt\filemod@oldest
+}
+\def\filemod@oldest@opt#1#2]{%
+ \filemod@oldest{#2}%
+}
+\def\filemod@oldest#1#2#3{%
+ \filemod@@cmp<{#1}{#2}{#3}{#2}{#3}%
+}
+\def\filemodNewest#1#{%
+ \expandafter\expandafter
+ \expandafter\@filemodNewest
+ \csname
+ @%
+ \ifx\@nnil#1\@nnil
+ first%
+ \else
+ second%
+ \fi
+ oftwo%
+ \endcsname
+ {[\filemodoptdefault]}%
+ {#1}%
+}
+\def\filemodOldest#1#{%
+ \expandafter\expandafter
+ \expandafter\@filemodOldest
+ \csname
+ @%
+ \ifx\@nnil#1\@nnil
+ first%
+ \else
+ second%
+ \fi
+ oftwo%
+ \endcsname
+ {[\filemodoptdefault]}%
+ {#1}%
+}
+\def\@filemodNewest[#1]#2{%
+ \@@filemodNewest{#1}#2\filemod@end
+}
+\def\@filemodOldest[#1]#2{%
+ \@@filemodOldest{#1}#2\filemod@end
+}
+\def\@@filemodNewest#1#2{%
+ \filemod@Newest{#2}{#1}%
+}
+\def\@@filemodOldest#1#2{%
+ \filemod@Oldest{#2}{#1}%
+}
+\def\filemod@Newest#1#2#3{%
+ \iffilemod@end{#3}%
+ {#1}%
+ {%
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\filemod@Newest
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter{%
+ \expandafter\expandafter
+ \expandafter\@gobble
+ \expandafter\string\csname\filemod@@cmp>{#2}{#1}{#3}{#1}{#3}\endcsname}{#2}}%
+}
+\def\filemod@Oldest#1#2#3{%
+ \iffilemod@end{#3}%
+ {#1}%
+ {%
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\filemod@Oldest
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter{%
+ \expandafter\expandafter
+ \expandafter\@gobble
+ \expandafter\string\csname\filemod@@cmp<{#2}{#1}{#3}{#1}{#3}\endcsname}{#2}}%
+}
+\def\iffilemod@end#1{%
+ \ifx\filemod@end#1%
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+\def\filemod@end{\@gobble{filemod@end}}
+\def
+\Filemodgetnum{\filemodparse\Filemod@getnum}
+\def\Filemod@getnum#1#2#3#4#5#6#7{%
+ \def\filemoddate{#1#2#3}%
+ \def\filemodtime{#4#5#6}%
+ \def\filemodtz{#7}%
+}
+\def\Filemod@cmp#1#2#3{%
+ \Filemodgetnum{#2}%
+ \let\filemoddatea\filemoddate
+ \let\filemodtimea\filemodtime
+ \Filemodgetnum{#3}%
+ \ifcase0%
+ \ifnum\filemoddate>\filemoddatea\space1\else
+ \ifnum\filemoddate=\filemoddatea\space
+ \ifnum\filemodtime>\filemodtimea\space1\else
+ \ifnum\filemodtime=\filemodtimea\space2\fi
+ \fi
+ \fi
+ \fi
+ \relax
+ \def\filemodresultfile{#1}%
+ \ifnum#1>2\relax
+ \def\filemodcmpresult##1##2##3{##1}%
+ \else
+ \let\filemodcmpresult\@firstoftwo
+ \fi
+ \or
+ \def\filemodresultfile{#2}%
+ \ifnum#1>2\relax
+ \def\filemodcmpresult##1##2##3{##2}%
+ \else
+ \let\filemodcmpresult\@secondoftwo
+ \fi
+ \else
+ \ifcase#1\relax
+ \let\filemodresultfile\empty
+ \let\filemodcmpresult\@gobbletwo
+ \or
+ \def\filemodresultfile{#1}%
+ \let\filemodcmpresult\@firstoftwo
+ \or
+ \def\filemodresultfile{#2}%
+ \let\filemodcmpresult\@secondoftwo
+ \else
+ \let\filemodresultfile\empty
+ \let\filemodcmpresult\@thirdofthree
+ \fi
+ \fi
+ \filemod@next
+}
+\def\filemod@chkopt#1{%
+ \def\filemod@optcmd{#1}%
+ \futurelet\filemod@tok\filemod@@chkopt
+}
+\def\filemod@@chkopt{%
+ \ifx[\filemod@tok
+ \expandafter\filemod@readopt
+ \else
+ \expandafter\filemod@optcmd
+ \expandafter\filemodoptdefault
+ \fi
+}
+\def\filemod@readopt[#1]{%
+ \filemod@optcmd{#1}%
+}
+\def\Filemodnewest{\filemod@chkopt\Filemod@newest}
+\def\Filemod@newest#1#2#3{\Filemod@Newest{#1}{{#2}{#3}}}
+\def\Filemodoldest{\filemod@chkopt\Filemod@oldest}
+\def\Filemod@oldest#1#2#3{\Filemod@Oldest{#1}{{#2}{#3}}}
+\def\FilemodNewest{\filemod@chkopt\Filemod@Newest}
+\def\Filemod@Newest#1#2%
+{%
+ \def\filemode@tie{#1}%
+ \def\filemod@gl{>}%
+ \Filemod@est#2\filemod@end
+}
+\def\FilemodOldest{\filemod@chkopt\Filemod@Oldest}
+\def\Filemod@Oldest#1#2%
+{%
+ \def\filemode@tie{#1}%
+ \def\filemod@gl{<}%
+ \Filemod@est#2\filemod@end
+}
+\def\Filemod@est#1{%
+ \def\filemodresultfile{#1}%
+ \Filemodgetnum{#1}%
+ \let\filemodresultdate\filemoddate
+ \let\filemodresulttime\filemodtime
+ \Filemod@@est
+}
+\def\Filemod@@est#1{%
+ \iffilemod@end{#1}{}{%
+ \Filemodgetnum{#1}%
+ \ifcase0%
+ \ifnum\filemoddate\filemod@gl\filemodresultdate\space1\else
+ \ifnum\filemoddate=\filemodresultdate\space
+ \ifnum\filemodtime\filemod@gl\filemodresulttime\space1\else
+ \ifnum\filemodtime=\filemodresulttime\space
+ \ifnum\filemode@tie=1\else 1\fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \def\filemodresultfile{#1}%
+ \let\filemodresultdate\filemoddate
+ \let\filemodresulttime\filemodtime
+ \fi
+ \Filemod@@est
+ }%
+}
+\def\filemod@gl{>}
+\def
+\filemodprint{\filemodparse\thefilemod}
+\def
+\filemodprintdate{\filemodparse\the@filemoddate}
+\def
+\filemodprinttime{\filemodparse\the@filemodtime}
+\def\thefilemod#1#2#3#4#5#6#7%
+{%
+ \thefilemoddate{#1}{#2}{#3}%
+ \filemodsep
+ \thefilemodtime{#4}{#5}{#6}{#7}%
+}
+\let\filemodsep\space
+\def\thefilemoddate#1#2#3%
+{#1/#2/#3}
+\def\thefilemodtime#1#2#3#4%
+{%
+ #1:#2:#3~#4%
+}
+\def\the@filemoddate#1#2#3#4#5#6#7{%
+ \thefilemoddate{#1}{#2}{#3}%
+}
+\def\the@filemodtime#1#2#3{%
+ \thefilemodtime
+}
+\begingroup
+\catcode`\D=12
+\expandafter\gdef\csname filemodZ\endcsname{Z}%
+\let\filemodz=Z\relax
+\endgroup
+\filemod@cat
+\expandafter\let\csname filemod@cat\endcsname\relax
+\endinput
+%%
+%% End of file `filemod.tex'.
diff --git a/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty b/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
index beae7a20b60..85357bb09cd 100644
--- a/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
+++ b/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
@@ -15,21 +15,54 @@
%% This work consists of the files filemod.dtx and filemod.ins
%% and the derived filebase filemod.sty.
\ProvidesPackage{filemod-expmin}[%
- 2011/03/23 v1.0
+ 2011/03/24 v1.1
Get and compare file modification times (expandable; minimal)]
+\ifx\filemod@directtrue\@undefined
+\csname newif\expandafter\endcsname\csname iffilemod@direct\endcsname
+\filemod@directtrue
+\ifx\pdffilemoddate\@undefined
+ \RequirePackage{pdftexcmds}
+ \filemod@directfalse
+ \ifx\pdf@filemoddate\@undefined
+ \edef\filemod@help
+ {The required command \string\pdffilemoddate\space is not defined.
+ This means that the used\space\space LaTeX compiler does not support it.
+ Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
+ XeLaTeX does not support reading file modification\space\space dates.
+ }%
+ \PackageError{filemod}{Required command \string\pdffilemoddate\space is not defined!}{\filemod@help}
+ \fi
+\fi
+\fi
\begingroup
-\@makeother\D
-\@makeother\Z
-\@makeother:
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
+\newcommand*\filemodNumdate{}
+\iffilemod@direct
\gdef\filemodNumdate#1{%
\expandafter\filemod@Numdate\pdffilemoddate{#1}D:00000000000000Z\relax
}
+\else
+\gdef\filemodNumdate#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numdate\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
\gdef\filemod@Numdate D:#1#2#3#4#5#6#7#8#9\relax{%
#1#2#3#4#5#6#7#8%
}
+\newcommand*\filemodNumtime{}
+\iffilemod@direct
\gdef\filemodNumtime#1{%
\expandafter\filemod@Numtime\pdffilemoddate{#1}D:00000000000000Z\relax
}
+\else
+\gdef\filemodNumtime#1{%
+ \expandafter\expandafter
+ \expandafter\filemod@Numtime\pdf@filemoddate{#1}D:00000000000000Z\relax
+}
+\fi
\gdef\filemod@Numtime D:#1#2#3#4#5#6#7#8#9\relax{%
\filemod@@Numtime#9\relax
}
@@ -37,7 +70,8 @@
#1#2#3#4#5#6%
}
\endgroup
-\newcommand*\filemodCmp[2]{%
+\newcommand*\filemodCmp[2]%
+{%
\ifcase0%
\ifnum\filemodNumdate{#2}>\filemodNumdate{#1} 1\else
\ifnum\filemodNumdate{#2}=\filemodNumdate{#1} %
diff --git a/Master/texmf-dist/tex/latex/filemod/filemod.sty b/Master/texmf-dist/tex/latex/filemod/filemod.sty
index cb90336c925..3fa49d20fed 100644
--- a/Master/texmf-dist/tex/latex/filemod/filemod.sty
+++ b/Master/texmf-dist/tex/latex/filemod/filemod.sty
@@ -15,11 +15,36 @@
%% This work consists of the files filemod.dtx and filemod.ins
%% and the derived filebase filemod.sty.
\ProvidesPackage{filemod}[%
- 2011/03/23 v1.0
+ 2011/03/24 v1.1
Get and compare file modification times]
-\newcommand*\filemodparse[2]{%
+\ifx\filemod@directtrue\@undefined
+\csname newif\expandafter\endcsname\csname iffilemod@direct\endcsname
+\filemod@directtrue
+\ifx\pdffilemoddate\@undefined
+ \RequirePackage{pdftexcmds}
+ \filemod@directfalse
+ \ifx\pdf@filemoddate\@undefined
+ \edef\filemod@help
+ {The required command \string\pdffilemoddate\space is not defined.
+ This means that the used\space\space LaTeX compiler does not support it.
+ Please make sure that pdfLaTeX 1.30.0 or\space\space\space newer or LuaLaTeX is used.
+ XeLaTeX does not support reading file modification\space\space dates.
+ }%
+ \PackageError{filemod}{Required command \string\pdffilemoddate\space is not defined!}{\filemod@help}
+ \fi
+\fi
+\fi
+\newcommand*\filemodparse{}
+\iffilemod@direct
+\def\filemodparse#1#2{%
\expandafter\filemod@parse\pdffilemoddate{#2}\relax{#1}%
}
+\else
+\def\filemodparse#1#2{%
+ \expandafter\expandafter
+ \expandafter\filemod@parse\pdf@filemoddate{#2}\relax{#1}%
+}
+\fi
\def\filemod@parse#1\relax#2{%
\ifx\relax#1\relax
\expandafter\@firstoftwo
@@ -30,12 +55,13 @@
{\filemod@parse@#1\empty{#2}\relax}%
}
\begingroup
-\@makeother\D
-\@makeother\Z
-\@makeother:
+\catcode`\D=12
+\catcode`\Z=12
+\catcode`\:=12
\gdef\filemod@parse@ D:#1#2#3#4#5#6#7#8#9\relax{%
\filemod@parse@@{{#1#2#3#4}{#5#6}{#7#8}}#9\relax
}
+\newcommand*\filemodnotexists{}
\gdef\filemodnotexists#1{%
#1{0000}{00}{00}{00}{00}{00}{Z}%
}
@@ -44,9 +70,11 @@
#9#1{#2#3}{#4#5}{#6#7}{#8}%
}
\RequirePackage{filemod-expmin}
-\newcommand*\filemodnumdate{\filemodparse\filemod@numdate}
+\newcommand*%
+\filemodnumdate{\filemodparse\filemod@numdate}
\def\filemod@numdate#1#2#3#4#5#6#7{#1#2#3}
-\newcommand*\filemodnumtime{\filemodparse\filemod@numtime}
+\newcommand*%
+\filemodnumtime{\filemodparse\filemod@numtime}
\def\filemod@numtime#1#2#3#4#5#6#7{#4#5#6}
\def\filemod@opt#1#2#3{%
\expandafter
@@ -64,10 +92,12 @@
\expandafter#2
\fi
}
-\newcommand*\filemodcmp{%
+\newcommand*%
+\filemodcmp{%
\filemod@opt\filemod@cmp@opt\filemod@cmp
}
-\newcommand*\filemodoptdefault{1}
+\newcommand*%
+\filemodoptdefault{1}
\def\filemod@cmp@opt#1#2]{%
\filemod@cmp{#2}%
}
@@ -102,7 +132,8 @@
}
\long\def\@firstofthree#1#2#3{#1}
\long\def\@secondofthree#1#2#3{#2}
-\newcommand*\filemodnewest{%
+\newcommand*%
+\filemodnewest{%
\filemod@opt\filemod@newest@opt\filemod@newest
}
\def\filemod@newest@opt#1#2]{%
@@ -111,7 +142,8 @@
\def\filemod@newest#1#2#3{%
\filemod@@cmp>{#1}{#2}{#3}{#2}{#3}%
}
-\newcommand*\filemodoldest{%
+\newcommand*%
+\filemodoldest{%
\filemod@opt\filemod@oldest@opt\filemod@oldest
}
\def\filemod@oldest@opt#1#2]{%
@@ -204,7 +236,8 @@
\fi
}
\def\filemod@end{\@gobble{filemod@end}}
-\newcommand*\Filemodgetnum{\filemodparse\Filemod@getnum}
+\newcommand*%
+\Filemodgetnum{\filemodparse\Filemod@getnum}
\def\Filemod@getnum#1#2#3#4#5#6#7{%
\def\filemoddate{#1#2#3}%
\def\filemodtime{#4#5#6}%
@@ -264,12 +297,14 @@
}
\newcommand*\Filemodnewest[3][\filemodoptdefault]{\FilemodNewest[{#1}]{{#2}{#3}}}
\newcommand*\Filemodoldest[3][\filemodoptdefault]{\FilemodOldest[{#1}]{{#2}{#3}}}
-\newcommand*\FilemodNewest[2][\filemodoptdefault]{%
+\newcommand*\FilemodNewest[2][\filemodoptdefault]%
+{%
\def\filemode@tie{#1}%
\def\filemod@gl{>}%
\Filemod@est#2\filemod@end
}
-\newcommand*\FilemodOldest[2][\filemodoptdefault]{%
+\newcommand*\FilemodOldest[2][\filemodoptdefault]%
+{%
\def\filemode@tie{#1}%
\def\filemod@gl{<}%
\Filemod@est#2\filemod@end
@@ -303,19 +338,23 @@
}%
}
\def\filemod@gl{>}
-\newcommand*\filemodprint{\filemodparse\thefilemod}
-\newcommand*\filemodprintdate{\filemodparse\the@filemoddate}
-\newcommand*\filemodprinttime{\filemodparse\the@filemodtime}
-\newcommand*\thefilemod[7]{%
+\newcommand*
+\filemodprint{\filemodparse\thefilemod}
+\newcommand*
+\filemodprintdate{\filemodparse\the@filemoddate}
+\newcommand*
+\filemodprinttime{\filemodparse\the@filemodtime}
+\newcommand*\thefilemod[7]%
+{%
\thefilemoddate{#1}{#2}{#3}%
\filemodsep
\thefilemodtime{#4}{#5}{#6}{#7}%
}
-\let\filemodsep\space
-\newcommand*\thefilemoddate[3]{%
- #1/#2/#3%
-}
-\newcommand*\thefilemodtime[4]{%
+\newcommand*\filemodsep{ }
+\newcommand*\thefilemoddate[3]%
+{#1/#2/#3}
+\newcommand*\thefilemodtime[4]%
+{%
#1:#2:#3~#4%
}
\def\the@filemoddate#1#2#3#4#5#6#7{%
@@ -324,8 +363,10 @@
\def\the@filemodtime#1#2#3{%
\thefilemodtime
}
+\newcommand*\filemodZ{}
+\newcommand*\filemodz{}
\begingroup
-\@makeother\D
+\catcode`\D=12
\expandafter\gdef\csname filemodZ\endcsname{Z}%
\let\filemodz=Z\relax
\endgroup