diff options
author | Karl Berry <karl@freefriends.org> | 2007-04-02 18:57:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-04-02 18:57:27 +0000 |
commit | 363b13706a7bf98b8db87860873492eec4be6295 (patch) | |
tree | 5c9aa92b401685616238b34cc614d6116616561e /Master/texmf-dist/source/latex/svninfo | |
parent | 7d7fb8482d1f1b56ae7d0a5e25ab6b5b16170af1 (diff) |
svninfo 0.7 update (27mar07)
git-svn-id: svn://tug.org/texlive/trunk@4096 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/svninfo')
-rw-r--r-- | Master/texmf-dist/source/latex/svninfo/Makefile | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svninfo/svninfo.dtx | 231 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/svninfo/svninfo.ins | 4 |
3 files changed, 175 insertions, 64 deletions
diff --git a/Master/texmf-dist/source/latex/svninfo/Makefile b/Master/texmf-dist/source/latex/svninfo/Makefile index d235acbdedd..b704906a6a4 100644 --- a/Master/texmf-dist/source/latex/svninfo/Makefile +++ b/Master/texmf-dist/source/latex/svninfo/Makefile @@ -3,7 +3,7 @@ ## ## For configuration, update the following defines: ## -## $Id: Makefile 1896 2006-05-11 08:25:56Z brucker $ +## $Id: Makefile 3045 2007-03-25 20:34:21Z brucker $ ## ## This file ist part of the svninfo package. Please see the file ## svninfo.dtx for copyright information. @@ -24,7 +24,7 @@ TAR = tar ######################################################################## -REV = 0.6 +REV = 0.7 TAR_FILE = svninfo-$(REV).tar.gz TAR_DIR = svninfo-$(REV) SRC = svninfo.dtx svninfo.ins README Makefile diff --git a/Master/texmf-dist/source/latex/svninfo/svninfo.dtx b/Master/texmf-dist/source/latex/svninfo/svninfo.dtx index aad96124b55..8135a16abf3 100644 --- a/Master/texmf-dist/source/latex/svninfo/svninfo.dtx +++ b/Master/texmf-dist/source/latex/svninfo/svninfo.dtx @@ -1,4 +1,5 @@ -%\iffalse + +% \iffalse %<*header> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -9,7 +10,7 @@ %% by the Subversion revision control system. %% %% Copyright (C) 1995 Dr. Juergen Vollmer -%% Copyright (C) 2003-2006 Achim D. Brucker +%% Copyright (C) 2003-2007 Achim D. Brucker %% %% License: %% This program can be redistributed and/or modified under the terms @@ -64,14 +65,20 @@ % \def\param#1{\texttt{\##1}} % \newcommand{\Cmd}[1]{\texttt{$\backslash$#1}} % \newcommand{\Svn}{\emph{Subversion}} +% \newcommand{\Svk}{\emph{svk}} % \newcommand{\blank}{{\tiny$_\sqcup$}} % \newcommand{\Id}{\texttt{\$Id\$}} % \newcommand{\SvnInfoCmd}[1]{\texttt{$\backslash$svnInfo\blank\$Id#1\$\blank}} % -% \changes{v0.6}{2006/}{Added \texttt{\\svnInfoMinRevision} and +% \changes{v0.7}{2007/03/26}{Added option \texttt{margin} for showing +% version info in the margins of the document; added option +% \texttt{svk} for supporting the keyword expansion of svk; added command +% \texttt{\\svnMaxToday}; and fixed the use of \texttt{fancyhdr} for +% single-sided documents.} +% \changes{v0.6}{2006/05/11}{Added \texttt{\\svnInfoMinRevision} and % \texttt{\\svnInfoMaxRevision} together with the option -% \texttt{revrange}. Also added support for \texttt{\\} in keywords.} -% \changes{v0.5}{2006/01/11}{Removed support for \LatexToHtml (it is +% \texttt{revrange}. Also added support for \texttt{\textbackslash} in keywords.} +% \changes{v0.5}{2006/01/11}{Removed support for \LatexToHtml{} (it is % non-free software and also seems to be unmaintained) and added new % command \texttt{\\svnKeyword} for defining arbitrary svn keywords % (e.g. \texttt{\string$Author:\string$}).} @@ -89,31 +96,35 @@ % \author{Achim D.~Brucker\\ % {\footnotesize brucker@freiburg.linux.de}\\ % {\footnotesize http://www.brucker.ch/}} -% \date{May 11, 2006\\Version 0.6} +% \date{March 26, 2007\\Version 0.7} % % \maketitle % % \begin{abstract} -% \noindent This package is used to extract the revision and file -% information provided by the \Svn\ revision control system -% (\texttt{http://subversion.tigris.org}). +% \noindent This package is used to extract the revision and file +% information provided by the \Svn\ +% (\texttt{http://subversion.tigris.org}) and the \Svk\ +% (\texttt{http://svk.elixus.org}) revision control system. % \end{abstract} % %\section{Introduction} % % To maintain different versions of a document or to keep track on the -% development of one, -% the document is kept under a revision control system like \emph{SCCS}, -% \emph{CVS}, or \Svn. -% This package assumes you are using the \Svn\ system. -% To present the version information of a document, one needs to extract it -% from some kind of text inserted by the revision control system. -% \Svn\ offers therefore several keywords that are expanded by the \Svn\ -% \emph{update} command. The most informative keyword is -% |$Id$| which contains a lot of useful information. This information -% is made available through this package. Additionally, the package -% allows one to extract also the information from the more specific -% keywords, e.g., |$Author$| or |$Date$|. +% development of one, the document is kept under a revision control +% system like \emph{SCCS}, \emph{CVS}, or \Svn. This package assumes +% you are using either the \Svn\ or the \Svk\ system. To present the +% version information of a document, one needs to extract it from some + +% \Svk\ offer therefore several keywords that are expanded by the +% \Svn\ and \Svk\ \emph{update} commands. The most informative keyword +% is |$Id$| which contains a lot of useful information. This +% information is made available through this package. Additionally, +% the package allows one to extract also the information from the more +% specific keywords, e.g., |$Author$| or |$Date$|. +% +% In this documentation we we \Svn in the examples; but the results +% should be similar if you use \Svk. Note that you to use the +% \texttt{svk} option if you use \Svk. % % The information obtained from the expanded \Id\ string are % \begin{itemize} @@ -124,7 +135,7 @@ % \end{itemize} % For each of these items a macro is defined. % When \emph{updating} a file, the \Svn\ keywords should be contained in -% the \emph{updated} source. Further, one has to set the \Svn property +% the \emph{updated} source. Further, one has to set the \Svn\ property % for keyword expansion of that file, e.g.\ % \begin{verbatim} % svn propset svn:keywords "Id" svninfo.dtx @@ -142,6 +153,9 @@ % Options for this package are: % % \begin{description} +% \item[svk] +% Use \texttt{svk} for parsing the Id information generated by +% \Svk. % \item[today] % Set the date of |\svnToday| to the date obtained by the \Svn\ information. % If the \Id\ string is not expanded (see below), the current date is @@ -171,6 +185,8 @@ % \item[eso-foot] % Use \texttt{eso-pic} for showing a tiny info line at the bottom % line of the paper. +% \item[margin] Use \texttt{margin} for showing the version info in +% the margin area. % \item[long] % If used together with \texttt{fancy} / \texttt{fancyhdr} the date % string is printed in the long format @@ -237,7 +253,6 @@ % number of multi-file documents. Every file of the document must either % include a |\svnInfo| or a |\svnKeyword $Revision:$| statement. % This is information needs two runs of \LaTeX{} to be correct. -% of \LaTeX{} to be correct. % Default: \texttt{--minrevision--}. % \item \DescribeMacro{\svnInfoMaxRevision} The maximum revision % number of multi-file documents. Every file of the document must either @@ -266,6 +281,9 @@ % information. % \item \DescribeMacro{\svnToday} The date obtained from the \Svn\ information % in the format |\today| is using. +% \item \DescribeMacro{\svnMaxToday} The date obtained from the latest +% \Svn revision in the format |\today| is using, e.g., you can +% use something like |\date{\svnMaxToday}| in your preample. % \end{itemize} % \section{Examples} % @@ -285,6 +303,7 @@ % \Cmd{svnInfoDay} & \svnInfoDay \\ % \Cmd{svnInfoLongDate} & \svnInfoLongDate \\ % \Cmd{svnToday} & \svnToday \\ +% \Cmd{svnMaxToday} & \svnMaxToday \\ % \end{tabular}\\ % \Cmd{svnId} \svnId % \bigskip @@ -385,16 +404,17 @@ % ('\texttt{macros/latex/contrib/svn}'). % % Further I want to thank all the people that reported bugs and ideas -% for improvements, often including patches: Michael Niedermair, Heiko -% Oberdiek, Bernd Raichle, J\"org Sommer, Arnout Standaert, Thomas Weber, and Uwe -% Ziegenhagen. +% for improvements, often including patches: Christophe Jacquet, Jami +% Lawrence, Stefan Mann, Nigel Metheringham, Michael Niedermair, Heiko +% Oberdiek, Bernd Raichle, J\"org Sommer, Arnout Standaert, Daniel +% Tr\"umper, Thomas Weber, and Uwe Ziegenhagen. % % \section{Copyright and License} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % \begin{tabular}{ll} % Copyright (\copyright) 1995 & Dr. J{\"u}rgen Vollmer\\ -% Copyright (\copyright) 2003--2006 & Achim D.~Brucker \texttt{brucker@freiburg.linux.de}\\ +% Copyright (\copyright) 2003--2007 & Achim D.~Brucker \texttt{brucker@freiburg.linux.de}\\ % \end{tabular} % % \noindent This program can be redistributed and/or modified under @@ -472,7 +492,7 @@ % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{svninfo}[2006/05/11 v0.6] +\ProvidesPackage{svninfo}[2007/03/26 v0.8] % \end{macrocode} % % Declare some local counters to store the \Svn\ date @@ -480,6 +500,9 @@ \newcount\@svnInfoDay \newcount\@svnInfoMonth \newcount\@svnInfoYear +\newcount\@svnInfoMaxDay +\newcount\@svnInfoMaxMonth +\newcount\@svnInfoMaxYear % \end{macrocode} % % To memorize, that we want to set |\svnToday| to the date obtained by the @@ -527,13 +550,17 @@ % \end{macrocode} % % To memorize, that we want to have the old \texttt{fancyheadings}, the new -% \texttt{fancyhdr}, or \texttt{srcpage2}, or \texttt{eso-pic} +% \texttt{fancyhdr}, \texttt{srcpage2}, \texttt{eso-pic}, or \texttt{margin}. % footline filled with \Svn\ information. % \begin{macrocode} +\newif\if@svnInfoNotPreamble@% +\@svnInfoNotPreamble@false% \newif\if@svnInfoUseFancy@ \newif\if@svnInfoUseFancyhdr@ \newif\if@svnInfoUseScrpage@ \newif\if@svnInfoUseEsofoot@ +\newif\if@svnInfoUseMargin@ +\newif\if@svnInfoSVK@ % \end{macrocode} % % We want to use the \texttt{fancyhdr} @@ -564,6 +591,12 @@ \@svnInfoUseScrpage@false \@svnInfoUseEsofoot@true } +\DeclareOption{margin}{ + \@svnInfoUseMargin@true +} +\DeclareOption{svk}{ + \@svnInfoSVK@true +} % \end{macrocode} % % Ok we don't want do use it. @@ -669,8 +702,8 @@ \def\svnInfo {\@svnBeginRead - \@svnInfoReadArgs -} + \@svnInfoReadArgs + } % \end{macrocode} %\end{macro} @@ -750,12 +783,18 @@ \def\svnInfoFile{#1}% \def\svnInfoRevision{#2}% \ifthenelse{\(\equal{\svnInfoMaxRevision}{--maxrevision--}\) % - \OR \( #2 > \svnInfoMaxRevision \)}{\def\svnInfoMaxRevision{#2}}{}% + \OR \( #2 > \svnInfoMaxRevision \)}{% + \@svnInfoMaxYear =\@svnInfoYear + \@svnInfoMaxMonth =\@svnInfoMonth + \@svnInfoMaxDay =\@svnInfoDay + \def\svnInfoMaxRevision{#2}% + }{}% \ifthenelse{\(\equal{\svnInfoMinRevision}{--minrevision--}\) % \OR \( #2 < \svnInfoMinRevision \)}{\def\svnInfoMinRevision{#2}}{}% \def\svnInfoTime{#4}% % \@svnInfoSplitDate x#3x% + \@svnInfoMargin% \def\svnInfoLongDate{\@svnInfoToday}% \if@svnInfoToday@ \year =\@svnInfoYear @@ -777,11 +816,19 @@ % This macro sets |\svnInfoYear|, |\svnInfoMonth|, and |\svnInfoDay|. % It takes a \texttt{x}\emph{YYYY-MM-DD}\texttt{x} style of argument. % \begin{macrocode} -\def\@svnInfoSplitDate x#1-#2-#3x{% - \@svnInfoDay =#3\relax - \@svnInfoMonth=#2\relax - \@svnInfoYear =#1\relax +\if@svnInfoSVK@ + \def\@svnInfoSplitDate x#1-#2-#3T#4Zx{% + \@svnInfoDay =#3\relax + \@svnInfoMonth=#2\relax + \@svnInfoYear =#1\relax } +\else% + \def\@svnInfoSplitDate x#1-#2-#3x{% + \@svnInfoDay =#3\relax + \@svnInfoMonth=#2\relax + \@svnInfoYear =#1\relax +} +\fi% % \end{macrocode} %\end{macro} % @@ -801,6 +848,14 @@ \svnToday \endgroup } +\def\@svnInfoMaxToday {% + \begingroup + \year =\@svnInfoMaxYear + \month =\@svnInfoMaxMonth + \day =\@svnInfoMaxDay + \svnToday + \endgroup +} % \end{macrocode} %\end{macro} @@ -812,6 +867,9 @@ \@svnInfoYear =\year \@svnInfoMonth =\month \@svnInfoDay =\day + \@svnInfoMaxYear =\year + \@svnInfoMaxMonth =\month + \@svnInfoMaxDay =\day \def\svnInfoFile{--sourcefile--}% \def\svnInfoHeadURL{--head-url--}% \def\svnInfoDate{\the\@svnInfoYear-\two@digits\@svnInfoMonth-% @@ -825,6 +883,7 @@ \def\svnInfoMonth{\the\@svnInfoMonth}% \def\svnInfoDay{\the\@svnInfoDay}% \def\svnInfoLongDate{\@svnInfoToday}% + \ifthenelse{\isundefined{\svnInoMaxToday}}{\def\svnMaxToday{\@svnInfoMaxToday}}{}% \def\svnId{\svnInfoFile\ \svnInfoRevision\ \svnInfoTime\ \svnInfoOwner}% } @@ -867,18 +926,31 @@ % \end{macrocode} % for the \texttt{fancyhdr} package, % \begin{macrocode} - \if@svnInfoDraft@ + \if@svnInfoDraft@ \if@svnInfoUseFancyhdr@ - \fancyfoot[LE,RO]{\@svnInfoFancyInfo}% - \fancyfoot[LO,RE]{\@svnInfoFancyFile}% - \fancyfoot[CO,CE]{\thepage}% - \renewcommand{\footrulewidth}{0.4pt}% - \fancypagestyle{plain}{% - \fancyfoot[LE,RO]{\@svnInfoFancyInfo}% - \fancyfoot[LO,RE]{\@svnInfoFancyFile}% - \fancyfoot[CO,CE]{\thepage}% - \renewcommand{\footrulewidth}{0.4pt}% - } + \if@twoside + \fancyfoot[LE,RO]{\@svnInfoFancyInfo}% + \fancyfoot[LO,RE]{\@svnInfoFancyFile}% + \fancyfoot[CO,CE]{\thepage}% + \renewcommand{\footrulewidth}{0.4pt}% + \fancypagestyle{plain}{% + \fancyfoot[LE,RO]{\@svnInfoFancyInfo}% + \fancyfoot[LO,RE]{\@svnInfoFancyFile}% + \fancyfoot[CO,CE]{\thepage}% + \renewcommand{\footrulewidth}{0.4pt}% + } + \else + \fancyfoot[L]{\@svnInfoFancyInfo}% + \fancyfoot[R]{\@svnInfoFancyFile}% + \fancyfoot[C]{\thepage}% + \renewcommand{\footrulewidth}{0.4pt}% + \fancypagestyle{plain}{% + \fancyfoot[L]{\@svnInfoFancyInfo}% + \fancyfoot[R]{\@svnInfoFancyFile}% + \fancyfoot[C]{\thepage}% + \renewcommand{\footrulewidth}{0.4pt}% + } + \fi \fi \fi % \end{macrocode} @@ -908,7 +980,28 @@ \fi } % \end{macrocode} -%\end{macro} +% \end{macro} +% \begin{macro}{\@svnInfoMargin} +% for the \texttt{margin} option. +% \begin{macrocode} +\def\@svnInfoMargin{ + \if@svnInfoDraft@ + \if@svnInfoNotPreamble@ + \if@svnInfoUseMargin@ + \expandafter\marginpar[% + {\raggedleft\tiny\svnInfoFile, \svnInfoRevision, % + \svnInfoDate, \svnInfoTime, \svnInfoOwner}% + ]{% + {\raggedright\tiny\svnInfoFile, \svnInfoRevision, % + \svnInfoDate, \svnInfoTime, \svnInfoOwner}% + }% +\fi +\fi +\fi +} +% \end{macrocode} +% +% \end{macro} % % Initialize the defaults % \begin{macrocode} @@ -919,6 +1012,7 @@ % \texttt{fancyhdr} footline, we should set it here. % \begin{macrocode} \AtBeginDocument{% + \@svnInfoNotPreamble@true \if@svnInfoDraft@ \if@svnInfoUseFancy@ \@svnInfoFancyFoot @@ -940,6 +1034,7 @@ \AtEndDocument{% \immediate\write\@mainaux{\string\gdef\string\svnInfoMinRevision{\svnInfoMinRevision}}% \immediate\write\@mainaux{\string\gdef\string\svnInfoMaxRevision{\svnInfoMaxRevision}}% + \immediate\write\@mainaux{\string\gdef\string\svnMaxToday{\immediate\svnMaxToday}}% } % \end{macrocode} %\subsection{The generic \texttt{\string\svnKeyword} command} @@ -1055,21 +1150,37 @@ % \end{macro} % \begin{macro}{\svn@parse@date} % \begin{macrocode} +\if@svnInfoSVK@ + \def\svn@parse@date$#1-#2-#3T#4:#5:#6.#7${% + \@svnInfoDay =#3\relax% + \@svnInfoMonth=#2\relax% + \@svnInfoYear =#1\relax% + \def\svnInfoLongDate{\@svnInfoToday}% + \if@svnInfoToday@ + \year =\@svnInfoYear + \month =\@svnInfoMonth + \day =\@svnInfoDay + \fi +% \end{macrocode} +% We could add `GMT' to |\svnKeywordTime|. Or not bother. +% \begin{macrocode} + \def\svnInfoTime{#4:#5:#6}% + } +\else \def\svn@parse@date$#1-#2-#3 #4:#5:#6 #7${% + \@svnInfoDay =#3\relax% \@svnInfoMonth=#2\relax% \@svnInfoYear =#1\relax% - \def\svnInfoLongDate{\@svnInfoToday}% - \if@svnInfoToday@ - \year =\@svnInfoYear - \month =\@svnInfoMonth - \day =\@svnInfoDay - \fi -% \end{macrocode} -% We could add `GMT' to |\svnKeywordTime|. Or not bother. -% \begin{macrocode} - \def\svnInfoTime{#4:#5:#6}% -} + \def\svnInfoLongDate{\@svnInfoToday}% + \if@svnInfoToday@ + \year =\@svnInfoYear + \month =\@svnInfoMonth + \day =\@svnInfoDay + \fi + \def\svnInfoTime{#4:#5:#6}% + } +\fi % \end{macrocode} % \end{macro} @@ -1195,7 +1306,7 @@ \Msg{} \Msg{***********************************************************} \Msg{** Hello to the installation of the `svninfo' package.} -\Msg{** Version 0.6, May 11, 2006} +\Msg{** Version 0.7, March 26, 2007} \Msg{***********************************************************} \Msg{} diff --git a/Master/texmf-dist/source/latex/svninfo/svninfo.ins b/Master/texmf-dist/source/latex/svninfo/svninfo.ins index 066aedc84ca..9d0d72f70f7 100644 --- a/Master/texmf-dist/source/latex/svninfo/svninfo.ins +++ b/Master/texmf-dist/source/latex/svninfo/svninfo.ins @@ -29,7 +29,7 @@ %% by the Subversion revision control system. %% %% Copyright (C) 1995 Dr. Juergen Vollmer -%% Copyright (C) 2003-2006 Achim D. Brucker +%% Copyright (C) 2003-2007 Achim D. Brucker %% License: %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -63,7 +63,7 @@ \Msg{} \Msg{***********************************************************} \Msg{** Hello to the installation of the `svninfo' package.} -\Msg{** Version 0.5, Januar 11, 2006} +\Msg{** Version 0.7, March 26, 2007} \Msg{***********************************************************} \Msg{} |