369
|
1 |
%%
|
|
2 |
%% This is file `svn.sty',
|
|
3 |
%% generated with the docstrip utility.
|
|
4 |
%%
|
|
5 |
%% The original source files were:
|
|
6 |
%%
|
|
7 |
%% svn.dtx (with options: `package')
|
|
8 |
%%
|
|
9 |
%% This is a generated file.
|
|
10 |
%%
|
|
11 |
%% Copyright (C) 2003 by Richard Lewis <rpil+svn@rtf.org.uk>
|
|
12 |
%%
|
|
13 |
%% This file may be distributed and/or modified under the conditions
|
|
14 |
%% of the LaTeX Project Public License, either version 1.2 of this
|
|
15 |
%% license or (at your option) any later version. The latest version
|
|
16 |
%% of this license is in:
|
|
17 |
%%
|
|
18 |
%% http://www.latex-project.org/lppl.txt
|
|
19 |
%%
|
|
20 |
%% and version 1.2 or later is part of all distributions of LaTeX
|
|
21 |
%% version 1999/12/01 or later.
|
|
22 |
%%
|
|
23 |
\NeedsTeXFormat{LaTeX2e}
|
|
24 |
\def\next $Id: #1 #2 #3-#4-#5 #6${%
|
|
25 |
\def\svn@date{#3/#4/#5}%
|
|
26 |
\def\svn@revision{#2}%
|
|
27 |
}
|
|
28 |
\next $Id: svn.dtx 32 2003-09-21 19:08:50Z rpil2 $
|
|
29 |
\edef\next{%
|
|
30 |
\noexpand\ProvidesPackage{svn}[\svn@date\space r\svn@revision\space
|
|
31 |
Typeset Subversion keywords.]%
|
|
32 |
}
|
|
33 |
\next
|
|
34 |
\def\SVN $#1${\svn@$#1: $}
|
|
35 |
\let\SVNempty\relax
|
|
36 |
\def\svn@$#1: #2${%
|
|
37 |
\def\svn@tmp{#2}%
|
|
38 |
\ifx\svn@tmp\@empty
|
|
39 |
\def\svn@suffix{@unexpanded}%
|
|
40 |
\else
|
|
41 |
\def\svn@suffix{@expanded}%
|
|
42 |
\fi
|
|
43 |
\@ifundefined{SVN@#1\svn@suffix}%
|
|
44 |
{\@nameuse{SVN@generic\svn@suffix}{#1}{#2}}%
|
|
45 |
{\@nameuse{SVN@#1\svn@suffix}{#1}{#2}}%
|
|
46 |
}
|
|
47 |
\def\SVN@generic@expanded#1#2{%
|
|
48 |
\expandafter\svn@set\csname SVN#1\endcsname$#2$%
|
|
49 |
}
|
|
50 |
\def\SVN@generic@unexpanded#1#2{%
|
|
51 |
\expandafter\global\expandafter\let\csname SVN#1\endcsname\SVNempty
|
|
52 |
}
|
|
53 |
\def\svn@set#1$#2 : ${\gdef#1{#2}}
|
|
54 |
\def\SVN@Date@unexpanded#1#2{%
|
|
55 |
\gdef\SVNDate{\today}%
|
|
56 |
\global\let\SVNTime\SVNempty
|
|
57 |
\global\let\SVNRawDate\SVNempty
|
|
58 |
}
|
|
59 |
\let\SVN@LastChangedDate@unexpanded\SVN@Date@unexpanded
|
|
60 |
\def\SVN@Date@expanded#1#2{%
|
|
61 |
\svn@set\SVNRawDate$#2$%
|
|
62 |
\svn@parse@date$#2$%
|
|
63 |
}
|
|
64 |
\let\SVN@LastChangedDate@expanded\SVN@Date@expanded
|
|
65 |
\def\svn@parse@date$#1-#2-#3 #4:#5:#6 #7${%
|
|
66 |
\gdef\SVNDate{%
|
|
67 |
\begingroup
|
|
68 |
\def\svn@tmp{\PackageError{svn}{\SVNDate should not
|
|
69 |
be used in an \protect\edef}{See the svn.sty documentation for a
|
|
70 |
work around.}}%
|
|
71 |
\day#3 \month#2 \year#1
|
|
72 |
\today
|
|
73 |
\endgroup}%
|
|
74 |
\gdef\SVNTime{#4:#5:#6}%
|
|
75 |
}
|
|
76 |
\def\SVNdate $#1${\SVN $#1$\date{\SVNDate}}
|
|
77 |
\endinput
|
|
78 |
%%
|
|
79 |
%% End of file `svn.sty'.
|