diff options
author | Karl Berry <karl@freefriends.org> | 2009-03-29 00:02:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-03-29 00:02:03 +0000 |
commit | 43a7105f048cdbdeda3ea4c6c6ebd31948e2c5f0 (patch) | |
tree | 7d948dc496a28981ad02eaab14ba2f02d2fca071 /Master/texmf-dist/tex/latex | |
parent | eaa8639264ba02c98a791e7a78bb22239841f79f (diff) |
svn-multi 2.1 (28mar09)
git-svn-id: svn://tug.org/texlive/trunk@12558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty | 322 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/svn-multi/svnkw.sty | 18 |
2 files changed, 304 insertions, 36 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 index 76550d11554..22d1d92e512 100644 --- a/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty +++ b/Master/texmf-dist/tex/latex/svn-multi/svn-multi.sty @@ -25,16 +25,16 @@ %% This work consists of the files svn-multi.dtx, svn-multi-pl.dtx, svn-multi.ins %% and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl. %% -\def\filedate$#1: #2 #3 #4-#5-#6 #7 ${% - \year#4\month#5\day#6\relax - \def\filedate{#4/#5/#6}% - \def\filerev{#3}% -} -\filedate$Id: svn-multi.dtx 621 2009-03-23 12:26:36Z martin $ -\def\fileversion{v2.0} +\makeatletter +\def\svnmulti@version {v2.1} +\def\svnmulti@rev $#1: #2 ${\def\svnmulti@rev{#2}} +\def\svnmulti@date $#1: #2-#3-#4 #5 ${\def\svnmulti@date{#2/#3/#4}} +\svnmulti@rev $Rev: 691 $\relax +\svnmulti@date $Date: 2009-03-27 21:37:56 +0000 (Fri, 27 Mar 2009) $\relax + \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{svn-multi} - [\filedate\space\fileversion\space SVN Keywords for multi-file LaTeX documents] + [\svnmulti@date\space\svnmulti@version\space SVN Keywords for multi-file LaTeX documents] \RequirePackage{kvoptions} @@ -44,6 +44,8 @@ } \newif\if@svnmulti@anygraphic \newif\if@svnmulti@autoload +\newif\if@svnmulti@autokw +\newif\if@svnmulti@autokwall \DeclareVoidOption{old}{% \@svnmulti@verbatimtrue @@ -76,6 +78,7 @@ \DeclareStringOption{autoload}[true] \DeclareBoolOption[false]{table} \DeclareBoolOption[false]{filehooks} +\DeclareStringOption[false]{autokw}[all] \ExecuteOptions{old} \ProcessKeyvalOptions{svn-multi} @@ -136,6 +139,29 @@ ! Only 'true','false' or empty (='true') are allowed!} \fi\fi\fi\fi +\def\svn@temp{true} +\ifx\@svnmulti@autokw\svn@temp + \@svnmulti@autokwtrue + \@svnmulti@autokwalltrue + \svn@depoption{filehooks} +\fi +\def\svn@temp{all} +\ifx\@svnmulti@autokw\svn@temp + \@svnmulti@autokwtrue + \@svnmulti@autokwalltrue + \svn@depoption{filehooks} +\fi +\def\svn@temp{ext} +\ifx\@svnmulti@autokw\svn@temp + \@svnmulti@autokwtrue + \@svnmulti@autokwallfalse +\fi +\def\svn@temp{false} +\ifx\@svnmulti@autokw\svn@temp + \@svnmulti@autokwfalse + \@svnmulti@autokwallfalse +\fi + \if@svnmulti@graphics \@svnmulti@anygraphictrue \fi @@ -188,6 +214,24 @@ \@secondoftwo \fi } + +\def\svn@ifeof#1{% + \ifeof#1% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} + +\def\svn@ifonlyone#1{% + \expandafter\expandafter\expandafter + \svn@@ifonlyone\csname @svng@#1@files\endcsname,\relax +} + +\def\svn@@ifonlyone#1,#2\relax{% + \svn@ifempty{#2} +} + \def\svn@input#1{% \begingroup \let\svn@rg\svn@g @@ -195,14 +239,12 @@ \global\let\svn@g\svn@rg \endgroup } + \def\svn@inputsvx#1{% \svn@pushfilestack \svn@input{#1.svx}% \svn@popfilestack } -\providecommand\@namexdef[1]{% - \expandafter\xdef\csname #1\endcsname -} \def\svnrev{-1} \def\@svn@rev{-1} \def\svndate{} \def\@svn@date{} @@ -219,7 +261,7 @@ \def\svnurl{} \def\svnfname{} \def\svn@temp{} -\def\svn@pg{} \def\svn@g{} \def\svn@cg{\svn@g} +\def\svn@pg{} \def\svn@g{} \def\svn@cg{\svn@g} \def\svn@rg{\svn@pg} \let\@svng@@files\relax \def\svn@initfile{% @@ -236,8 +278,181 @@ \gdef\svnfiletimezoneminute{00}% \gdef\svnfileurl{}% \gdef\svnfilefname{}% + \gdef\svnfiledir{}% } \svn@initfile + + +\begingroup +\@makeother\^^L +\if@svnmulti@autokw +\gdef\svne@ff{^^L} +\fi +\endgroup + +\if@svnmulti@autokw +\newread\svne@read + +\newcommand*{\svne@catcodes}{% + \let\do\@makeother + \endlinechar=-1 + \dospecials + \do\- \do\: \do\. \do\^^L +} + +\def\svne@readline#1{% + \ifeof\svne@read + \def#1{}% + \else + \read\svne@read to #1\relax + \fi +} + +\def\svne@gobblerest{% + \ifeof\svne@read + \let\next\relax + \else + \read\svne@read to \svn@temp + \ifx\svn@temp\svne@ff + \let\next\relax + \else + \let\next\svne@gobblerest + \fi + \fi + \next +} + +\def\svne@endread{% + \closein\svne@read +} + +\newcommand*{\svne@parseentriesfile}[1]{% + \begingroup + \let\next\relax + \openin\svne@read=#1format\relax + \ifeof\svne@read\else + \svne@readline\svne@version + \closein\svne@read + \ifnum\svne@version>7\relax + \openin\svne@read=#1entries\relax + \ifeof\svne@read\else + \svne@catcodes + \svne@readline\svne@version + \ifnum\svne@version>7\relax + \def\next{\svne@parsedirentry% + \svne@parseentries} + \else + \closein\svne@read + \fi + \fi + \fi + \fi + \next + \endgroup +} + +\newcommand*{\svne@parsedirentry}{% + \svne@readline\svne@name + \svne@readline\svne@kind + \svn@ifempty{\svne@name}% + {\svn@ifequal{\svne@kind}{dir}% + {% + {\svne@readline\svn@temp}% + \svne@readline\svne@baseurl + \svne@gobblerest + }{}% + }{}% +} + +\begingroup + +\@makeother\- +\@makeother\: +\@makeother\. + +\gdef\svne@scandate#1{% + \expandafter\svne@scandate@#1\relax + 0000-00-00T00:00:00.00000Z\relax\relax +} + +\gdef\svne@scandate@#1-#2-#3T#4:#5:#6.#7\relax#8\relax{% + \gdef\svnfileyear{#1}% + \gdef\svnfilemonth{#2}% + \gdef\svnfileday{#3}% + \gdef\svnfilehour{#4}% + \gdef\svnfileminute{#5}% + \gdef\svnfilesecond{#6}% + \gdef\svnfiletimezonehour{+00}% + \gdef\svnfiletimezoneminute{00}% + \gdef\svnfiledate{#1-#2-#3 #4:#5:#6Z}% + \def\svne@date{#1-#2-#3 #4:#5:#6Z}% +} + +\endgroup + +\newcommand*{\svne@parseentries}{% + \svn@ifeof{\svne@read}% + {}% + {% + \svne@readline\svne@name + \@onelevel@sanitize\svne@name + \svn@ifeof{\svne@read}% + {}% + {% + \svne@readline\svne@kind + \svn@ifequal{\svne@kind}{file}% + {% + \svne@readline\svn@temp + \svne@readline\svn@temp + \svne@readline\svn@temp + \svne@readline\svn@temp + \svne@readline\svn@temp + \svne@readline\svn@temp + \svne@readline\svne@date + \svne@readline\svne@rev + \svne@readline\svne@author + %\@onelevel@sanitize\svne@date + \svne@scandate{\svne@date}% + \edef\svne@url{\svne@baseurl/\svne@name}% + \svne@handleentry + }{}% + \svne@gobblerest + \svne@parseentries + }% + }% +} + +\def\svne@handleentry{% + \svn@ifequal{\svne@name}{\svnfilefname}% + {% + \svnkwdef{Filename}{\svne@name}% + \svnkwdef{Date}{\svne@date}% + \svnkwdef{Revision}{\svne@rev}% + \svnkwdef{Author}{\svne@author}% + \svnkwdef{HeadURL}{\svne@url}% + \@svn@updateid{\svne@rev}{\svne@date}{\svne@author}{\svne@url}% + \svne@endread + }{}% +}% + +\def\svnegetfile#1{% + \begingroup + \svn@getfilename{#1}% + \edef\svnfilefname{\svnfilefname}% + \@onelevel@sanitize\svnfilefname + \svne@parseentriesfile{\svnfiledir .svn/}% + \svne@parseentriesfile{\svnfiledir _svn/}% + \endgroup +} + +\if@svnmulti@autokwall +\AtBeginDocument{% + \svnegetfile{\jobname.\svn@mainext}% +} +\fi + +\fi + \def\svntimezone{\svntimezonehour\svntimezoneminute\svn@gobblezeros} \def\svnfiletimezone{\svnfiletimezonehour\svnfiletimezoneminute\svn@gobblezeros} \def\svncgtimezone{\svncgtimezonehour\svncgtimezoneminute} @@ -1004,8 +1219,8 @@ Try a different version, e.g. v2.1.1 from 2008/02/27}{}% }% } -\svnignoreextensions{aux,bbl,cfg,cls,fd,enc,fls,glo,idx,ilg,ind,ist,% -lof,log,lot,out,sty,svn,svt,svx,toc} +\svnignoreextensions{aux,bbl,fd,enc,fls,glo,idx,ilg,ind,ist,% +lof,log,lot,out,svn,svt,svx,toc} \svnmulti@atendinputfile{% \if@svnmulti@subgroups @@ -1017,10 +1232,25 @@ lof,log,lot,out,sty,svn,svt,svx,toc} \fi } +\if@svnmulti@subgroups + \ifsvnsubgroups + \svn@addfiletogroup{\jobname .\svn@mainext}{\jobname}% + \svnsubgroup + \fi +\fi \AtBeginDocument{% \if@svnmulti@subgroups \ifsvnsubgroups - \svn@addfiletogroup{\jobname .\svn@mainext}{\jobname}% + \@ifundefined{@svng@\svn@g @files}% + {% + \expandafter + \xdef\csname @svng@\svn@g @files\endcsname{\jobname}% + }% + {% + \expandafter + \xdef\csname @svng@\svn@g @files\endcsname + {\jobname,\csname @svng@\svn@g @files\endcsname}% + }% \svnsubgroup \fi \fi @@ -1041,6 +1271,27 @@ lof,log,lot,out,sty,svn,svt,svx,toc} \def\svn@externalgroup{} \fi +\if@svnmulti@autokw +\newcommand*\svnexternal[2][]{% + \svn@pushfilestack + \svn@ifequal{#1}{*}% + {\edef\svn@eg{\svn@g}}% + {\svn@ifempty{#1}% + {\edef\svn@eg{\svn@externalgroup}}% + {\edef\svn@eg{#1}}% + }% + \svne@@external#2\relax + \svn@popfilestack +} + +\def\svne@@external#1{% + \ifx\relax#1\empty\else + \svnegetfile{#1}% + \begingroup\svn@externalfile{\svn@eg}{#1}% + \expandafter\svne@@external + \fi +} +\else \newcommand*\svnexternal[2][]{% \if@filesw \svn@checkwrite @@ -1058,6 +1309,7 @@ lof,log,lot,out,sty,svn,svt,svx,toc} \fi \svn@inputsvx{\svn@filedir\svn@filebase}% } +\fi \def\svnexternalpath#1{% \if@filesw @@ -1263,7 +1515,7 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% } \def\svntable{% - \begin{tabular}{p{0.425\textwidth}rp{0.25\textwidth}p{0.225\textwidth}}% + \begin{tabular}{p{0.425\textwidth}rll}% \hline } \def\endsvntable{\hline\end{tabular}} @@ -1339,14 +1591,21 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% \def\svn@getfilename#1{% \begingroup + \gdef\svnfiledir{}% \edef\svn@temp{#1}% \expandafter\@svn@getfilename\svn@temp/{}\relax }% \def\@svn@getfilename#1/#2\relax{% - \svn@ifempty{#2}% - {\endgroup\gdef\svnfilefname{#1}}% - {\@svn@getfilename#2\relax}% + \svn@ifempty{#2}% + {% + \endgroup + \gdef\svnfilefname{#1}% + }% + {% + \xdef\svnfiledir{\svnfiledir#1/}% + \@svn@getfilename#2\relax + }% }% \@input{\jobname .svn} @@ -1415,11 +1674,15 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% {% \@ifundefined{@svng@\svn@file @files}% {\svn@writefilerow{\the\svn@grouplevel}{\svn@file}}% - {\svn@ifequal{\csname @svng@\svn@file @files\endcsname}{\svn@file.tex}% - {\svn@writefilerow{\the\svn@grouplevel}{\svn@file.tex}}% - {% - \svn@writesubgrouprow{\the\svn@grouplevel}{\svn@file}% - \svn@writegroupfiles{\svn@file}% + {\svn@ifonlyone{\svn@file}% + {\svn@writefilerow{\the\svn@grouplevel}% + {\csname @svng@\svn@file @files\endcsname}}% + {\svn@ifempty{\csname @svng@\svn@file @files\endcsname}% + {}% + {% + \svn@writesubgrouprow{\the\svn@grouplevel}{\svn@file}% + \svn@writegroupfiles{\svn@file}% + }% }% }% }{}% @@ -1463,6 +1726,17 @@ patch generated macros '\string\pgf@image@<name>!' from the 'pgf' package!}% \fi } +\if@svnmulti@autokwall + +\svnmulti@atbegininputfile{% + \expandafter + \ifx\csname svn@ignore@ext@\svn@fileext\endcsname\relax + \svnegetfile{\svn@filepath}% + \fi +} + +\fi + \AtEndDocument{% \if@filesw \ifx\@svn@rev\empty\else diff --git a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty b/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty index 190ab159052..b3aa179102a 100644 --- a/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty +++ b/Master/texmf-dist/tex/latex/svn-multi/svnkw.sty @@ -25,20 +25,14 @@ %% This work consists of the files svn-multi.dtx, svn-multi-pl.dtx, svn-multi.ins %% and the derived files svn-multi.sty, svnkw.sty and svn-multi.pl. %% -\def\filedate$#1: #2 #3 #4-#5-#6 #7 ${% - \year#4\month#5\day#6\relax - \def\filedate{#4/#5/#6}% - \def\filerev{#3}% -} -\filedate$Id: svn-multi.dtx 621 2009-03-23 12:26:36Z martin $ -\def\fileversion{v2.0} +\makeatletter \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{svnkw} -[\filedate\space\fileversion\space Backward compatibility wrapper for svn-multi] -\PackageWarning{svnkw}{The package 'svnkw' got renamed to 'svn-multi' -and is now only a backward compatibility wrapper which loads 'svn-multi'. -Please adjust your document preamble to use the new name.} -\RequirePackage{svn-multi}[\filedate] + [2009/03/27 v2.1 Backward compatibility wrapper for svn-multi] +\PackageWarning{svnkw}{The package 'svnkw' got renamed to 'svn-multi' and is now +only a backward compatibility wrapper which loads 'svn-multi'. Please adjust +your document preamble to use the new name.} +\RequirePackage{svn-multi} \endinput %% %% End of file `svnkw.sty'. |