diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/rcs/rcs.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/rcs/rcs.sty | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/rcs/rcs.sty b/Master/texmf-dist/tex/latex/rcs/rcs.sty index 453b947d75c..cb87900c1f9 100644 --- a/Master/texmf-dist/tex/latex/rcs/rcs.sty +++ b/Master/texmf-dist/tex/latex/rcs/rcs.sty @@ -1,6 +1,8 @@ % $StyleId: rcs.doc,v 2.10 2003/02/02 20:42:38 schrod Exp $ +% With modifications by Jeff Goldberg, December 2, 1999 %---------------------------------------------------------------------- % Written by Joachim Schrod <jschrod@acm.org>. +% Minor modification by Jeffrey Goldberg <J.Goldberg@Cranfield.ac.uk> % Copyright conditions see below. % @@ -430,18 +432,36 @@ %%% definition of |\today|. This way language-specific styles (e.g., from %%% the \textsf{babel} system) may supply their own way to present a date. +%%% Modified put the group and |\day|, |\month|, and |\year| setting +%%% within the definition of RCSDate to avoid having to do an edef +%%% which would expand |\today| before babel could redefine it. ---JPG + +%%% Further modified to use simple character parsing to allow for both +%%% / delimiter used by original RCS and - delimiter used by modern +%%% CVS, taking care that old 2-digit RCS years are still handled +%%% properly. ---KHR + %%% \beginprog -\def\rcs_set_date #1/#2/#3 #4\end_date{% - \begingroup - \day #3 % <-- space! - \month #2 % <-- space! - \year #1 % <-- space! - \expandafter\xdef \csname RCS\RCS_keyword\endcsname {\today}% - \endgroup - \def\RCSTime{#4}% +\def\rcs_set_date #1 #2\end_date{% + \expandafter\def \csname RCS\RCS_keyword\endcsname + {\begingroup\rcs_set_date_really#1\today\endgroup}% + \def\RCSTime{#2}% } -%%% \endprog +\def\rcs_set_date_really#1#2#3#4#5{% + \ifx#3/ % Very old RCS file with two digit year... + \year 19#1#2 % <-- space! + \def\_{\rcs_set_date_really_ii#4#5}\expandafter\_ + \else + \year #1#2#3#4 % <-- space! + \expandafter\rcs_set_date_really_ii + \fi} + +\def\rcs_set_date_really_ii#1#2#3#4#5{% + \month #1#2 % <-- space! + \day #4#5 % <-- space! + } +%%% \endprog @@ -581,7 +601,7 @@ %%% \beginprog \def\RcsLogRevision#1#2#3#4{% \item [Revision #1]% - (created at \RcsLogDate #2\endDate\space \RcsLogTime{#3} % <-- space! + (created at \RcsLogDate #2\end_date\space \RcsLogTime{#3} % <-- space! by \RCS_get_author{#4})\\\relax } %%% \endprog @@ -599,13 +619,8 @@ %%% private macro, too. %%% \beginprog -\def\RcsLogDate #1/#2/#3\endDate{% - \begingroup - \day #3 % <-- space! - \month #2 % <-- space! - \year #1 % <-- space! - \today - \endgroup +\def\RcsLogDate #1\end_date{% + \begingroup\rcs_set_date_really#1\today\endgroup } \def\RcsLogTime#1{\ignorespaces} |