summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-04 10:09:25 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-04 10:09:25 +0000
commit963d78b0d54fe82f96c590fe5302c1faf6289cce (patch)
tree9e2f74899645fc189da7d551b9d477436c6a0999 /Master/texmf-dist/tex
parent637269a85d8dc7f8a9a4a62d23073499b1cb0ce2 (diff)
new zwgetfdate package
git-svn-id: svn://tug.org/texlive/trunk@9220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/zwgetfdate/zwgetfdate.sty55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/zwgetfdate/zwgetfdate.sty b/Master/texmf-dist/tex/latex/zwgetfdate/zwgetfdate.sty
new file mode 100644
index 00000000000..4f13a518228
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/zwgetfdate/zwgetfdate.sty
@@ -0,0 +1,55 @@
+%% $Id: zwgetfdate.sty 203 2008-06-14 18:56:59Z zw $
+%% Copyright 2008 Z. Wagner, http://icebearsoft.euweb.cz
+%
+% 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 Z. Wagner.
+%
+% This work consists of the files: zwgetfdate.sty and
+% the documentation files zwgetfdate.tex, zwgetfdate.pdf.
+
+\let\ZW@ProvidesPackage\ProvidesPackage
+\let\ZW@ProvidesFile\ProvidesFile
+
+\def\ProvidesPackage{\let\ZW@ProvidesWhat\ZW@ProvidesPackage \zw@provides}
+\def\ProvidesFile{\let\ZW@ProvidesWhat\ZW@ProvidesFile \zw@provides}
+
+\def\zw@provides#1{\def\ZW@StoredName{#1}\zw@get@optarg}
+\newcommand*\zw@get@optarg[1][]{\def\zw@temp{#1}\ifx\zw@temp\@empty
+ \def\zw@next{\ZW@ProvidesWhat{\ZW@StoredName}}%
+ \else
+ \expandafter\expandafter\expandafter\zw@getfdate\expandafter\zw@temp\space\@@@ZW
+ \def\zw@next{\ZW@ProvidesWhat{\ZW@StoredName}[#1]}%
+ \fi
+ \zw@next}
+
+\def\zw@fdate@prefix#1#2{\def\ZW@fdate@prefix{ZW@DateOf.#1@#2}}
+\def\ZW@date@namedef#1#2{\zw@fdate@prefix{#1}{#2}\@namedef{\ZW@fdate@prefix}}
+
+\def\zw@getfdate #1 #2\@@@ZW{%
+ \def\zw@internal ##1/##2/##3/##4\@@@ZW{%
+ \def\zw@temp{##3}\ifx\zw@temp\@empty\else
+ \ifx\ZW@ProvidesWhat\ZW@ProvidesPackage
+ \def\zw@temp{package}%
+ \else
+ \def\zw@temp{file}%
+ \fi
+ \ZW@date@namedef{\zw@temp}{\ZW@StoredName}{##1/##2/##3}\fi}%
+ \zw@internal #1///\@@@ZW}
+
+\ProvidesPackage{zwgetfdate}[2008/07/14 Get File/Package Date]
+
+\DeclareRobustCommand\DateOfPackage{\ZW@DateOf{package}}
+\DeclareRobustCommand\DateOfFile{\ZW@DateOf{file}}
+
+\def\ZW@DateOf#1#2{\zw@fdate@prefix{#1}{#2}\expandafter\ifx\csname\ZW@fdate@prefix\endcsname\relax
+ \PackageWarning{zwgetfdate}{Date of #1 `#2' is not available}\else
+ \@nameuse{\ZW@fdate@prefix}\fi}