summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-08 22:33:26 +0000
committerKarl Berry <karl@freefriends.org>2009-10-08 22:33:26 +0000
commit43f76defc822924473d9111705a67904cfd1276b (patch)
tree317933fa983e75ee54d175231513a7be6bfbf8c6 /Master/texmf-dist/tex
parentb676d1c3d9ca7308407a66f16654586bc0259090 (diff)
getfiledate 1.0 (7oct09)
git-svn-id: svn://tug.org/texlive/trunk@15701 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty76
1 files changed, 34 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
index 987d18bc3bf..0a8b452581e 100644
--- a/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
+++ b/Master/texmf-dist/tex/latex/getfiledate/getfiledate.sty
@@ -11,7 +11,7 @@
% (c) Ahmed Musa 2009 %
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
\ProvidesPackage{getfiledate}
- [2009/03/05 v1.0 Get date of last modification of existing file]
+ [2009/10/05 v1.0 Get date of last modification of existing file]
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{etoolbox}
\RequirePackage{ltxnew}
@@ -21,35 +21,18 @@
\RequirePackage{boxedminipage}
\new\long\def\gfd@err#1#2{\PackageError{getfiledate}{#1}{#2}}
\new\long\def\gfd@warn#1{\PackageWarningNoLine{getfiledate}{#1}}
-\new\def\gfd@head{0ex}
-\new\def\gfd@foot{0ex}
-\new\def\gfd@prefix{The date of last modification of file}
-\new\def\gfd@postfix{was}
-\new\def\gfd@marker{$\blacktriangleright$}
-\new\def\gfd@markercolor{blue}
-\new\def\gfd@filenamecolor{blue}
-\new\def\gfd@datecolor{blue}
-\new\def\gfd@inlinespace{1em}
-\new\def\gfd@file{getfiledate.sty}
-\new\let\gfd@align@right\relax
-\new\let\gfd@align@left\relax
-\new\dimen\gfd@width\gfd@width=\hsize
+\new\let\gfd@alignright\relax
+\new\let\gfd@alignleft\relax
\new\dimen\gfd@width@tmp\gfd@width@tmp=\z@
-\new\def\gfd@framesep{3pt}
-\new\def\gfd@framerule{0.4pt}
-\new\def\gfd@framecolor{black}
-\new\def\gfd@separatorcolor{black}
-\new\let\gfd@separator\textbullet
\new\let\T@C\textcolor
\providecommand\space{ }
-\define@boolkeys[gfd]{getfiledate}[gfd@]{%
- boxed,putprefix,notime}[true]{}
+\define@boolkeys[gfd]{getfiledate}[gfd@]{boxed,putprefix,notime}[true]
\define@cmdkey[gfd]{getfiledate}[gfd@]{prefix}[%
The date of last modification of file]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{postfix}[was]{}
-\define@cmdkey[gfd]{getfiledate}[gfd@]{file}{}
-\define@key[gfd]{getfiledate}{width}[\hsize]{\gfd@width=#1\relax}
-\define@cmdkey[gfd]{getfiledate}[gfd@]{marker}[$\blacktriangleright$]{}
+\define@cmdkey[gfd]{getfiledate}[gfd@]{file}[nofile.tex]{}
+\define@cmdkey[gfd]{getfiledate}[gfd@]{width}[\hsize]{}
+\define@cmdkey[gfd]{getfiledate}[gfd@]{marker}[]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{markercolor}[blue]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{filenamecolor}[blue]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{datecolor}[blue]{}
@@ -60,39 +43,47 @@
\define@cmdkey[gfd]{getfiledate}[gfd@]{framerule}[0.4pt]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{separator}[\textbullet]{}
\define@cmdkey[gfd]{getfiledate}[gfd@]{framecolor}[black]{}
-\define@cmdkey[gfd]{getfiledate}[gfd@]{separatorcolor}[black]{}
+\define@cmdkey[gfd]{getfiledate}[gfd@]{sepcolor}[black]{}
+\define@cmdkey[gfd]{getfiledate}[gfd@]{separator}[\textbullet]{}
\define@choicekey*+[gfd]{getfiledate}{align}[\gfd@val\gfd@nr]%
{center,right,left,justified}[justified]{%
\ifcase\gfd@nr\relax
- \def\gfd@align@right{\hfil}%
- \def\gfd@align@left{\hfil}%
+ \def\gfd@alignright{\hfil}%
+ \def\gfd@alignleft{\hfil}%
\or
- \def\gfd@align@right{\hfill}%
- \let\gfd@align@left\relax
+ \def\gfd@alignright{\hfill}%
+ \let\gfd@alignleft\relax
\or
- \let\gfd@align@right\relax
- \def\gfd@align@left{\hfill}%
+ \let\gfd@alignright\relax
+ \def\gfd@alignleft{\hfill}%
\or
- \let\gfd@align@right\relax
- \let\gfd@align@left\relax
+ \let\gfd@alignright\relax
+ \let\gfd@alignleft\relax
\fi
}{%
\gfd@err{Inadmissible value '#1' for align}
}
\DeclareOptionX*{\gfd@warn{Unknown option '\CurrentOption' ignored}}
-\ExecuteOptionsX[gfd]<getfiledate>{}
+\ExecuteOptionsX[gfd]<getfiledate>[notime,boxed]{%
+ align=center,head,foot,prefix,postfix,marker,markercolor,
+ filenamecolor,datecolor,inlinespace,file,width,framesep,
+ framerule,framecolor,sepcolor,separator,putprefix
+}
\ProcessOptionsX*[gfd]<getfiledate>\relax
+\begingroup
\ifcsdef{pdffilemoddate}{}{%
\gfd@err{Missing command \string\pdffilemoddate}{%
Use pdfTeX 1.30.0 or later version}
- \expandafter\endinput
+ \aftergroup\endinput
}
+\endgroup
\newcommand\getfiledate[2][]{%
\setkeys[gfd]{getfiledate}{#1}%
\setkeys[gfd]{getfiledate}{file={#2}}%
\par\vspace{\gfd@head}%
\begingroup
- \gfd@align@right%
+ \gfd@alignright%
+ \mbox{%
\ifgfd@boxed
\let\gfd@marker\@empty
\def\gfd@inlinespace{\z@}
@@ -106,7 +97,8 @@
\else
\noindent\gfd@tempa{\gfd@file}%
\fi
- \gfd@align@left%
+ }%
+ \gfd@alignleft%
\endgroup
\par\vspace{\gfd@foot}%
}
@@ -120,22 +112,22 @@
}
\newcommand\gfd@tempb[8]{\gfd@tempc{#1#2#3#4}{#5#6}{#7#8}}
\newcommand\gfd@tempc[9]{\gfd@tempd{#1}{#2}{#3}{#4#5}{#6#7}{#8#9}}
-\def\gfd@prefix@a#1{%
- \ifcsempty{gfd@marker}{}{\gfd@marker@a}\relax
- \gfd@prefix\space\T@C{\gfd@filenamecolor}{#1}\space\gfd@postfix\space%
-}
\def\gfd@tempd#1#2#3#4#5#6#7\@nil#8{%
\parbox{\gfd@width}{%
\@killglue\noindent%
\ifbool{gfd@putprefix}{\gfd@prefix@a{#8}}{}\ignorespaces
\T@C{\gfd@datecolor}{#1-#2-#3}%
\ifbool{gfd@notime}{}{%
- \space\T@C{\gfd@separatorcolor}{\gfd@separator}\space%
+ \space\T@C{\gfd@sepcolor}{\gfd@separator}\space%
\T@C{\gfd@datecolor}{#4:#5:#6}\ignorespaces
}.%
}
\@killglue%
}
+\def\gfd@prefix@a#1{%
+ \ifcsempty{gfd@marker}{}{\gfd@marker@a}\relax
+ \gfd@prefix\space\T@C{\gfd@filenamecolor}{#1}\space\gfd@postfix\space%
+}
\def\gfd@marker@a{%
\T@C{\gfd@markercolor}{\gfd@marker}%
\leavevmode\hskip\gfd@inlinespace plus\z@ minus\z@\relax