diff options
author | Karl Berry <karl@freefriends.org> | 2007-07-16 15:58:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-07-16 15:58:40 +0000 |
commit | 0712d6aa258c39076a89220dd0d7284bf5f00091 (patch) | |
tree | 13feba27a6254b4de0a2463cda54c0c8756c01a4 /Master/texmf-dist/tex/latex/svn-multi | |
parent | b9e50b271f760c6fb44b08e291c9b36730d6cbf7 (diff) |
svn-multi 1.3a (11jul07)
git-svn-id: svn://tug.org/texlive/trunk@4604 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/svn-multi')
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty | 335 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svnkw.sty | 195 |
2 files changed, 337 insertions, 193 deletions
diff --git a/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty b/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty new file mode 100644 index 00000000000..15061b18576 --- /dev/null +++ b/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty @@ -0,0 +1,335 @@ +%% +%% This is file `svn-multi.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% svn-multi.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006-2007 by Martin Scharrer <martin@scharrer-online.de> +%% +%% 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 Martin Scharrer. +%% +%% This work consists of the files svn-multi.dtx and svn-multi.ins +%% and the derived files svn-multi.sty and svnkw.sty. +%% +%% DTX Id: $Id: svn-multi.dtx 628 2007-07-10 20:32:06Z martin $ +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{svn-multi} + [2007/07/10 v1.3a SVN Keywords for multi-file LaTeX documents] + +\newcommand{\svn}{\@ifnextchar{*}{\svn@s}{\svn@n}} +\def\svn@n#1{\@svn@n#1} +\def\svn@s*#1{\@svn@s#1} +\def\@svn@n$#1${#1} +\def\@svn@s$#1 ${#1} + +\def\svnrev{0} \def\svnfilerev{0} \def\@svn@rev{0} +\def\svndate{} \def\svnfiledate{} \def\@svn@date{} +\def\svnauthor{} \def\svnfileauthor{} \def\@svn@author{} +\def\svnyear{0} \def\svnfileyear{0} \def\@svn@year{0} +\def\svnmonth{0} \def\svnfilemonth{0} \def\@svn@month{0} +\def\svnday{0} \def\svnfileday{0} \def\@svn@day{0} +\def\svnhour{0} \def\svnfilehour{0} \def\@svn@hour{0} +\def\svnminute{0} \def\svnfileminute{0} \def\@svn@minute{0} +\def\svnsecond{0} \def\svnfilesecond{0} \def\@svn@second{0} +\def\svntimezone{0} \def\svnfiletimezone{0} \def\@svn@timezone{0} +\def\svnmainurl{NOT SET}\def\svnmainfilename{NOT SET} + +\newcommand*{\svnid}{% +\@svnidswtrue +\svnkwsave +} +\newif\if@svnidsw +\@svnidswfalse + +\def\svn@scanId#1 #2 #3 #4 #5\relax{% +\@svn@scandate{#3 #4}% +\@svn@updateid{#2}{#3 #4}{#5}% +\svnkwdef{Filename}{#1}% +\svnkwdef{Date}{#3 #4}% +\svnkwdef{Revision}{#2}% +\svnkwdef{Author}{#5}% +} + +\def\@svn@updateid#1#2#3{% #1 = rev, #2 date, #3 author (username) +\xdef\svnfilerev{#1}% +\xdef\svnfiledate{#2}% +\xdef\svnfileauthor{#3}% +\ifx\svnfilerev\empty\else +\ifnum\@svn@rev<\svnfilerev +\xdef\@svn@rev{#1}% +\xdef\@svn@date{#2}% +\xdef\@svn@author{#3}% +\xdef\@svn@year{\svnfileyear}% +\xdef\@svn@month{\svnfilemonth}% +\xdef\@svn@day{\svnfileday}% +\xdef\@svn@hour{\svnfilehour}% +\xdef\@svn@minute{\svnfileminute}% +\xdef\@svn@second{\svnfilesecond}% +\xdef\@svn@timezone{\svnfiletimezone}% +\else\fi +\fi +} + +\newcommand{\svnidlong}{% +\svnkwdef{HeadURL}{}% +\svnkwdef{LastChangedDate}{}% +\svnkwdef{LastChangedRevision}{0}% +\svnkwdef{LastChangedBy}{}% +\begingroup +\svn@catcodes +\catcode`\{=12 +\catcode`\}=12 +\svnidlong@readargsfull +} + +\def\svn@catcodes{% +\catcode`\%=12 +\catcode`\_=12 +\catcode`\^=12 +\catcode`\$=12 +\catcode`\&=12 +\catcode`\#=12 +\catcode`\~=12 + %%\catcode`\ =10 +\catcode`\\=12 +\catcode`\^^M=9 +} + +\begingroup +\catcode`\{=12\catcode`\}=12 +\catcode`\(=1\catcode`\)=2 +\gdef\svnidlong@readargsfull#1{#2}#3{#4}#5{#6}#7{#8}(% + \svnidlong@readargs(#2)(#4)(#6)(#8)% +) +\endgroup + +\def\svnidlong@readargs#1#2#3#4{% +\svnkwsave@read #1\relax +\svnkwsave@read #2\relax +\svnkwsave@read #3\relax +\svnkwsave@read #4\relax +\endgroup +\ifx\svnkwLastChangedDate\empty +\else\@svn@scanlongdate{\svnkwLastChangedDate}\fi +\@svn@updateid{\svnkw{LastChangedRevision}}{\svnkw{LastChangedDate}} +{\svnkw{LastChangedBy}}% +\ignorespaces +}% + +\def\svnkwsave{% +\begingroup +\svn@catcodes +\svnkwsave@readargs +} + +\gdef\svnkwsave@readargs#1{% +\svnkwsave@read#1\relax +\endgroup +\if@svnidsw + \ifx\svnkwId\empty + \else + \expandafter + \svn@scanId\svnkwId\relax + \@svnidswfalse + \fi +\fi +\ignorespaces +} + +\begingroup +\catcode`\$=12 +\gdef\svnkwsave@read $#1$\relax{% + \svn@checkcolon#1:\relax +} +\endgroup + +\begingroup +\catcode`\$=11 +\gdef\svnkwsave@parse$#1:#2${% +\expandafter\xdef\csname svnkw#1\endcsname{#2}} +\endgroup + +\newcommand{\svnkwdef}[2]{% +\@ifundefined{svnkwdef@#1} +{\svnkwdef@{#1}{#2}} +{\csname svnkwdef@#1\endcsname{#2}}% +} + +\newcommand{\svnkwdef@}[2] +{\expandafter\xdef\csname svnkw#1\endcsname{#2}} + +\def\svnkwdef@Rev#1{\svnkwdef@{Rev}{#1}} +\def\svnkwdef@Author#1{\svnkwdef@{Author}{#1}} +\def\svnkwdef@Date#1{\svnkwdef@{Date}{#1}} +\let\svnkwdef@Revision=\svnkwdef@Rev +\let\svnkwdef@LastChangedRevision=\svnkwdef@Rev +\let\svnkwdef@LastChangedBy=\svnkwdef@Author +\let\svnkwdef@LastChangedAt=\svnkwdef@Date +\def\svnkwRevision{\svnkwRev} +\def\svnkwLastChangedRevision{\svnkwRev} +\def\svnkwLastChangedBy{\svnkwAuthor} +\def\svnkwLastChangedAt{\svnkwDate} + +\svnkwdef{Rev}{0} +\svnkwdef{Date}{} +\svnkwdef{Author}{} +\svnkwdef{Filename}{} +\svnkwdef{HeadURL}{} + +\newcommand{\svnkw}[1]{% +\@ifundefined{svnkw#1} +{\PackageWarning{svn-multi}{SVN keyword '#1' not defined (typo?)}} +{\csname svnkw#1\endcsname}}% + +\def\svn@checkcolon#1:#2\relax{% + \def\svn@test{#2}% + \ifx\svn@test\empty + \svnkwdef{#1}{}% + \else + \svn@stripcolon#2\relax + \svnkwdef{#1}{\svn@value}% + \fi +} + +\def\svn@stripcolon#1:\relax{% + \def\svn@test{#1}% + \ifx\svn@test\empty + \gdef\svn@value{}% + \else + \ifx\svn@test\svn@spaceonly + \gdef\svn@value{}% + \else + \svn@stripspace#1\relax\relax + \fi\fi +} + +\def\svn@spaceonly{ } + +\def\svn@stripspace#1#2\relax{% + \def\svn@test{#1}% + \ifx\svn@test\svn@spaceonly + \gdef\svn@value{#2}% + \else + \svn@striptrailingspace#1#2\relax + \fi +} + +\def\svn@striptrailingspace#1 \relax{% + \gdef\svn@value{#1}% +} + +\def\@svn@scandate#1{\@svn@scandate@#1\relax} + +\def\@svn@scandate@#1-#2-#3 #4:#5:#6#7#8\relax{% +\gdef\svnfileyear{#1}% +\gdef\svnfilemonth{#2}% +\gdef\svnfileday{#3}% +\gdef\svnfilehour{#4}% +\gdef\svnfileminute{#5}% +\gdef\svnfilesecond{#6#7}% +\gdef\svnfiletimezone{+00}% #8 always 'Z' for Zulu-time (UTC) +} + +\def\@svn@scanlongdate#1{\expandafter\@svn@scanlongdate@#1\relax} +\def\@svn@scanlongdate@#1-#2-#3 #4:#5:#6 #700 #8\relax{% +\gdef\svnfileyear{#1}% +\gdef\svnfilemonth{#2}% +\gdef\svnfileday{#3}% +\gdef\svnfilehour{#4}% +\gdef\svnfileminute{#5}% +\gdef\svnfilesecond{#6}% +\gdef\svnfiletimezone{#7}% +} + +\def\svnpdfdate{\svnyear\svnmonth\svnday +\svnhour\svnminute\svnsecond\svntimezone'00'} + +\newcommand{\svnsetmainfile} +{\edef\svnmainurl{\svnkw{HeadURL}} +\edef\svnmainfilename{\svnkw{Filename}}} +\AtBeginDocument{\svnsetmainfile} + +\newcommand{\svnRegisterAuthor}[2]{% +\expandafter\def\csname svn@author@#1\endcsname{#2}% +} + +\newcommand{\svnFullAuthor}{% +\@ifnextchar{*} +{\svnFullAuthor@star} +{\svnFullAuthor@normal} +} +\def\svnFullAuthor@star*#1{\svnFullAuthor@{#1}{~(#1)}} +\def\svnFullAuthor@normal#1{\svnFullAuthor@{#1}{}} +\def\svnFullAuthor@#1#2{% +\@ifundefined{svn@author@#1} +{#1} +{\csname svn@author@#1\endcsname #2}% +} + +\newcommand{\svnRegisterRevision}[2]{% +\expandafter\def\csname svn@revision@#1\endcsname{#2} +} + +\newcommand{\svnFullRevision}{% +\@ifnextchar{*} +{\svnFullRevision@star} +{\svnFullRevision@normal} +} +\def\svnFullRevision@star*#1{\svnFullRevision@{#1}{~(r#1)}} +\def\svnFullRevision@normal#1{\svnFullRevision@{#1}{}} +\def\svnFullRevision@#1#2{% +\@ifundefined{svn@revision@#1} +{Revision #1} +{\csname svn@revision@#1\endcsname #2}% +} + + \DeclareRobustCommand*{\svnnolinkurl}{% + \@ifundefined{hyper@normalise} + {\PackageWarning{svn-multi}{Package hyperref is needed for \noexpand + \svnnolinkurl.}} + {\hyper@normalise\svnnolinkurl@}}% + \def\svnnolinkurl@#1{\Hurl{#1}} + +\AtEndDocument{% + \if@filesw + \ifx\@svn@rev\empty\else + \ifnum\@svn@rev=0\else + \ifx\@svn@date\empty\else + \ifx\@svn@author\empty\else + \newwrite\svn@write + \immediate\openout\svn@write=\jobname.svn + \immediate\write\svn@write{% + \@percentchar\space SVN cache^^J% + \noexpand\def\noexpand\svnrev{\@svn@rev}^^J% + \noexpand\def\noexpand\svndate{\@svn@date}^^J% + \noexpand\def\noexpand\svnauthor{\@svn@author}^^J% + \noexpand\def\noexpand\svnyear{\@svn@year}^^J% + \noexpand\def\noexpand\svnmonth{\@svn@month}^^J% + \noexpand\def\noexpand\svnday{\@svn@day}^^J% + \noexpand\def\noexpand\svnhour{\@svn@hour}^^J% + \noexpand\def\noexpand\svnminute{\@svn@minute}^^J% + \noexpand\def\noexpand\svnsecond{\@svn@second}^^J% + \noexpand\def\noexpand\svntimezone{\@svn@timezone}^^J% + } + \immediate\closeout\svn@write% + \fi\fi\fi\fi\fi% +} + +\InputIfFileExists{\jobname.svn}{}{} +\endinput +%% +%% End of file `svn-multi.sty'. diff --git a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty b/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty index ec63ae8c440..ca72d3de2ca 100644 --- a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty +++ b/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty @@ -1,195 +1,4 @@ -%% -%% This is file `svnkw.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% svnkw.dtx (with options: `package') -%% -%% This is a generated file. -%% -%% Copyright (C) 2006 by Martin Scharrer <martin@scharrer-online.de> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version -%% 1999/12/01 or later. -%% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{svnkw} - [2006/05/27 v1.0 SVN Keywords] - -\newcommand{\svn}[1]{\@svn#1} -\def\@svn$#1${#1} - -\newcommand{\svnkwdef}[2]{% -\@ifundefined{svnkwdef@#1} -{\svnkwdef@{#1}{#2}} -{\csname svnkwdef@#1\endcsname{#2}} -} - -\newcommand{\svnkwdef@}[2] -{\expandafter\xdef\csname svnkw#1\endcsname{#2}} - -\def\svnkwdef@Rev#1{\svnkwdef@{Rev}{#1}} -\def\svnkwdef@Author#1{\svnkwdef@{Author}{#1}} -\def\svnkwdef@Date#1{\svnkwdef@{Date}{#1}} -\let\svnkwdef@Revision=\svnkwdef@Rev -\let\svnkwdef@LastChangedRevision=\svnkwdef@Rev -\let\svnkwdef@LastChangedBy=\svnkwdef@Author -\let\svnkwdef@LastChangedAt=\svnkwdef@Date -\def\svnkwRevision{\svnkwRev} -\def\svnkwLastChangedRevision{\svnkwRev} -\def\svnkwLastChangedBy{\svnkwAuthor} -\def\svnkwLastChangedAt{\svnkwDate} -\svnkwdef{Rev}{0} % must always be numerical -\svnkwdef{Date}{} -\svnkwdef{Author}{} -\svnkwdef{Filename}{} -\svnkwdef{HeadURL}{} - -\newcommand{\svnkw}[1]{\csname svnkw#1\endcsname} - -\def\svn@scanId#1 #2 #3 #4 #5${% -\@svn@updateid{#2}{#3 #4}{#5}% -\svnkwdef{Filename}{#1}% -\svnkwdef{Date}{#3 #4}% -\svnkwdef{Revision}{#2}% -\svnkwdef{Author}{#5}% -} - -\def\svn@readkw$#1${% -\svn@readkw@sub$#1: $ % call submacro to get case -\ifnum\svn@case<3 -\def\svn@key{#1} -\let\svn@value=\svn@empty -\svn@checkkeyforcolon$#1:$ % needed for case '$kw:$' -\relax -\else -\svn@readkw@def$#1$ % needed to remove leading space -\fi -} - -\newcount\svn@case -\let\svn@empty=\empty -\def\svn@readkw@sub$#1: #2${% -\def\svn@temp{#2} -\ifx\svn@temp\empty -\svn@case=1 -\else -\svn@checkcolon$#2$ -\ifx\svn@temp\empty -\svn@case=2 -\else -\svn@case=3 -\fi\fi -} - -\def\svn@readkw@def$#1: #2 ${% -\def\svn@key{#1} -\def\svn@value{#2} -} - -\def\svn@checkcolon$#1: ${% -\def\svn@temp{#1} -} - -\def\svn@checkkeyforcolon$#1:#2${% -\def\svn@temp{#2} -\ifx\svn@temp\empty -\else -\def\svn@key{#1} -\fi -} - -\def\svnrev{0} % \ -\def\svndate{} % > Values for whole project -\def\svnauthor{} % / -\def\svnfilerev{0} % \ -\def\svnfiledate{} % > Values for current file -\def\svnfileauthor{} % / -\def\@svn@rev{0} % \ -\def\@svn@date{} % > Values for packet internal use -\def\@svn@author{} % / - -\newcommand{\svnid}[1]{% -\svn@readkw#1 % Read keyword -\ifx\svn@value\empty % Check if value is empty -\else -\expandafter\svn@scanId\svn@value$ % Scan Id -\fi -} - -\newcommand{\svnidlong}[4]{ -\svnkwdef{HeadURL}{}% -\svnkwdef{LastChangedDate}{}% -\svnkwdef{LastChangedRevision}{0}% -\svnkwdef{LastChangedBy}{}% -\svnkwsave{#1}\svnkwsave{#2} -\svnkwsave{#3}\svnkwsave{#4} -\@svn@updateid{\svnkw{LastChangedRevision}}{\svnkw{LastChangedDate}}% -{\svnkw{LastChangedBy}} -} - -\newcommand{\svnkwsave}[1]{% -\def\svn@temp{#1} -\ifx\svn@temp\empty -%% skip at empty argument -\else -\svn@readkw#1% read keyword -\svnkwdef{\svn@key}{\svn@value} -\fi -} - -\def\@svn@updateid#1#2#3{% #1 = rev, #2 date, #3 author (username) -\edef\svnfilerev{#1} -\edef\svnfiledate{#2} -\edef\svnfileauthor{#3} -\ifx\svnfilerev\empty\else % skip rest if rev is empty -\ifnum\@svn@rev<\svnfilerev% -\edef\@svn@rev{#1} -\edef\@svn@date{#2} -\edef\@svn@author{#3} -\else\fi -\fi -} - -\newcommand{\svnRegisterAuthor}[2]{% -\expandafter\def\csname svn@author@#1\endcsname{#2} -} - -\newcommand{\svnFullAuthor}{% -\@ifnextchar{*} -{\svnFullAuthor@star} -{\svnFullAuthor@normal} -} -\def\svnFullAuthor@star*#1{\svnFullAuthor@{#1}{\ (#1)}} -\def\svnFullAuthor@normal#1{\svnFullAuthor@{#1}{}} -\def\svnFullAuthor@#1#2{% -\csname svn@author@#1\endcsname #2 -} - -\AtEndDocument{ - \ifx\@svn@rev\empty\else - \ifnum\@svn@rev=0\else - \ifx\@svn@date\empty\else - \ifx\@svn@author\empty\else - \newwrite\svnwrite - \immediate\openout\svnwrite=\jobname.svn - \immediate\write\svnwrite{\@percentchar\space SVN cache} - \immediate\write\svnwrite{\noexpand\def\noexpand\svnrev{\@svn@rev}} - \immediate\write\svnwrite{\noexpand\def\noexpand\svndate{\@svn@date}} - \immediate\write\svnwrite{\noexpand\def\noexpand\svnauthor{\@svn@author}} - \immediate\closeout\svnwrite - \fi\fi\fi\fi -} - -\InputIfFileExists{\jobname.svn}{}{} -\endinput -%% -%% End of file `svnkw.sty'. + [2007/07/10 v1.3a Backward compatibility wrapper for svn-multi] +\RequirePackage{svn-multi}[2007/07/10] |