diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty index 6fa71ccf0d0..ea5db858889 100644 --- a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty +++ b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty @@ -1,12 +1,19 @@ +%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% +% This package fetches and formats the date of last modification of any % +% existing file. It is based on an idea by Heiko Oberdiek (2009). % +% % +% 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 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. % +% % +% (c) Ahmed Musa 2009 % +%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% \ProvidesPackage{getfiledate} [2009/03/05 v1.0 Get date of last modification of existing file] \NeedsTeXFormat{LaTeX2e} -\RequirePackage{comment} -\begin{comment} - This package fetches and formats the date of last modification of any existing file. It is based on an idea by Heiko Oberdiek (2009). - - 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 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. -\end{comment} +\RequirePackage{etoolbox} \RequirePackage{xkeyval} \RequirePackage[table]{xcolor} \RequirePackage{amssymb} @@ -24,9 +31,8 @@ \def\gfd@file{getfiledate.sty} \let\gfd@align@right\relax \let\gfd@align@left\relax -\def\gfd@width{\hsize} \newdimen\gfd@width\gfd@width=\hsize -\newdimen\gfd@width@tmp +\newdimen\gfd@width@tmp\gfd@width@tmp=\z@ \def\gfd@framesep{3pt} \def\gfd@framerule{0.4pt} \def\gfd@framecolor{black} @@ -71,34 +77,7 @@ \DeclareOptionX*{\gfd@warn{Unknown option '\CurrentOption' ignored}} \ExecuteOptionsX[gfd]<getfiledate>{} \ProcessOptionsX*[gfd]<getfiledate>\relax -\long\def\gfd@fifo#1\else#2\fi{\fi#1} -\ifx\ifcsname\@undefined\gfd@fifo - \def\ifdefined@gfd#1{% - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi - } -\else - \def\ifdefined@gfd#1{% - \ifcsname#1\endcsname - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - } -\fi -\def\ifempty@gfd#1{% - \begingroup\expandafter\expandafter\expandafter\endgroup - \expandafter\ifx\csname#1\endcsname\@empty - \expandafter\@firstoftwo% - \else - \expandafter\@secondoftwo% - \fi -} -\ifdefined@gfd{pdffilemoddate}{}{% +\ifcsdef{pdffilemoddate}{}{% \gfd@err{Missing command \string\pdffilemoddate}{% Use pdfTeX 1.30.0 or later version} \expandafter\endinput @@ -139,8 +118,8 @@ \newcommand\gfd@tempc[9]{\gfd@tempd{#1}{#2}{#3}{#4#5}{#6#7}{#8#9}} \def\gfd@tempd#1#2#3#4#5#6#7\@nil#8{% \parbox{\gfd@width}{% - \@killglue\noindent - \ifempty@gfd{gfd@marker}{}{\gfd@marker@a}\relax + \@killglue\noindent% + \ifcsempty{gfd@marker}{}{\gfd@marker@a}\relax \gfd@prefix\space\T@C{\gfd@filenamecolor}{#8}\space was\space\T@C{\gfd@datecolor}{#1-#2-#3}\space\T@C{\gfd@separatorcolor}{% \gfd@separator}\space\T@C{\gfd@datecolor}{#4:#5:#6}.% |