summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-06-01 15:53:46 +0000
committerKarl Berry <karl@freefriends.org>2006-06-01 15:53:46 +0000
commitdf41ca308be95dbd0f1d0447874bbd1c58cd24d2 (patch)
tree642aa9f3ce7c9df365ee12cdab7f76947c098435 /Master/texmf-dist/source
parent955c1d812fa0c5234eb84e068132571b9188c1ca (diff)
svninfo update
git-svn-id: svn://tug.org/texlive/trunk@1638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/svninfo/Makefile42
-rw-r--r--Master/texmf-dist/source/latex/svninfo/svninfo.dtx1402
-rw-r--r--Master/texmf-dist/source/latex/svninfo/svninfo.ins11
3 files changed, 663 insertions, 792 deletions
diff --git a/Master/texmf-dist/source/latex/svninfo/Makefile b/Master/texmf-dist/source/latex/svninfo/Makefile
index 968b2ea99f7..d235acbdedd 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 1490 2005-09-30 14:30:44Z brucker $
+## $Id: Makefile 1896 2006-05-11 08:25:56Z brucker $
##
## This file ist part of the svninfo package. Please see the file
## svninfo.dtx for copyright information.
@@ -18,31 +18,25 @@ DOCDIR = $(TEXDIR)/doc/latex2e
DVIPS = dvips
LATEX = latex
MAKEINDEX = makeindex
-LATEX2HTML = latex2html
PDFLATEX = pdflatex
- HTML_VER = 4.0,latin1,math
-
-HTML_DIR = html
-
TAR = tar
########################################################################
-REV = 0.3
+REV = 0.6
TAR_FILE = svninfo-$(REV).tar.gz
TAR_DIR = svninfo-$(REV)
-SRC = svninfo.dtx svninfo.ins README-$(REV) Makefile
-GEN = svninfo.sty svninfo2html.tex svninfo.perl svninfo.cfg \
- svninfo.init
+SRC = svninfo.dtx svninfo.ins README Makefile
+GEN = svninfo.sty svninfo.cfg svninfo.init
-all: $(BASE).sty dvi ps html pdf clean
+all: $(BASE).sty dvi ps pdf clean
sty: svninfo.sty
-dtx: svninfo.dtx svninfo2html.tex
-dvi: svninfo.dvi svninfo2html.dvi
-ps: svninfo.ps svninfo2html.ps
-pdf: svninfo.pdf svninfo2html.pdf
+dtx: svninfo.dtx
+dvi: svninfo.dvi
+ps: svninfo.ps
+pdf: svninfo.pdf
idx: $(BASE).ind $(BASE).gls
$(LATEX) $(BASE).dtx
@@ -50,8 +44,6 @@ idx: $(BASE).ind $(BASE).gls
$(LATEX) $*.ins
svninfo.cfg: svninfo.sty
-svninfo2html.tex: svninfo.sty
-svninfo.perl: svninfo.sty
svninfo.init: svninfo.sty
%.dvi:%.dtx
@@ -76,21 +68,7 @@ svninfo.init: svninfo.sty
%.ps:%.dvi
$(DVIPS) $*.dvi
-html: svninfo.perl svninfo2html.tex
- rm -fr $(HTML_DIR)
- mkdir $(HTML_DIR)
- @if type $(LATEX2HTML) > /dev/null 2>&1; \
- then $(LATEX) svninfo2html.tex; \
- $(LATEX2HTML) -dir $(HTML_DIR) -init_file svninfo.init \
- -html_version $(HTML_VER) svninfo2html.tex; \
- else echo; echo; \
- echo "******* no $(LATEX2HTML) installed"; \
- echo; echo; \
- fi
-
tar: distclean
- rm -f README-$(REV)
- cp README README-$(REV)
rm -fr $(TAR_DIR) $(TAR_FILE) $(TAR_FILE).gz
mkdir $(TAR_DIR)
cp -p $(SRC) $(TAR_DIR)
@@ -102,7 +80,7 @@ clean:
*.out
realclean: clean
- rm -fr $(HTML_DIR) *.dvi *.ps $(GEN) *.pdf
+ rm -fr *.dvi *.ps $(GEN) *.pdf
distclean: realclean
rm -fr README-*
diff --git a/Master/texmf-dist/source/latex/svninfo/svninfo.dtx b/Master/texmf-dist/source/latex/svninfo/svninfo.dtx
index 4ab963da6e1..aad96124b55 100644
--- a/Master/texmf-dist/source/latex/svninfo/svninfo.dtx
+++ b/Master/texmf-dist/source/latex/svninfo/svninfo.dtx
@@ -7,10 +7,9 @@
%%
%% This package is used to extract the revision and file information provided
%% by the Subversion revision control system.
-%% A PERL-package supporting svninfo and LaTeX2HTML is provieded too.
%%
%% Copyright (C) 1995 Dr. Juergen Vollmer
-%% Copyright (C) 2003-2005 Achim D. Brucker
+%% Copyright (C) 2003-2006 Achim D. Brucker
%%
%% License:
%% This program can be redistributed and/or modified under the terms
@@ -27,7 +26,7 @@
% in the driver
%\fi
%
-%% \CheckSum{345}
+%% \CheckSum{628}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -62,67 +61,75 @@
%
% \MakeShortVerb{\|}
% \newcommand{\LatexToHtml}{\LaTeX 2\texttt{HTML}}
+% \def\param#1{\texttt{\##1}}
% \newcommand{\Cmd}[1]{\texttt{$\backslash$#1}}
-% \newcommand{\SVN}{\emph{Subversion}}
+% \newcommand{\Svn}{\emph{Subversion}}
% \newcommand{\blank}{{\tiny$_\sqcup$}}
% \newcommand{\Id}{\texttt{\$Id\$}}
-% \newcommand{\SvnInfoCmd}[1]{\texttt{$\backslash$svnInfo\blank\$Id#1\$}}
-%
+% \newcommand{\SvnInfoCmd}[1]{\texttt{$\backslash$svnInfo\blank\$Id#1\$\blank}}
+%
+% \changes{v0.6}{2006/}{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
+% 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$}).}
+% \changes{v0.4}{2005/11/07}{Added new package options \texttt{draft}, \texttt{final},
+% \texttt{eso-foot}, and \texttt{scrpage}. Fixed problem
+% with `\_' in file names.}
% \changes{v0.3}{2005/09/30}{Added support for \texttt{\$Id:\$} keywords without
-% owner information (a bug reported by Uwe Ziegenhagen).}
-% \changes{v0.2.1}{2005/04/07}{Added \texttt{\\svnId} (suggested by Thomas Weber).}
+% owner information.}
+% \changes{v0.2.1}{2005/04/07}{Added \texttt{\\svnId}.}
% \changes{v0.2}{2005/01/17}{Removed \LatexToHtml{} build-dependency.}
% \changes{v0.1}{2003/08/14}{Initial version, mainly a modified version
% of the \texttt{rcsinfo} package.}
%
% \title{The \texttt{svninfo} package}
% \author{Achim D.~Brucker\\
-% {\footnotesize email: brucker@freiburg.linux.de}}
-% \date{Oktober 3, 2005\\Version 0.3}
+% {\footnotesize brucker@freiburg.linux.de}\\
+% {\footnotesize http://www.brucker.ch/}}
+% \date{May 11, 2006\\Version 0.6}
%
% \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}). Support for the \LatexToHtml\
-% conversion tool is provided\footnote{\LatexToHtml\ is a conversion
-% tool that allows documents written in \LaTeX\ to become part of the
-% World Wide Web. It's written by \emph{Nikos Drakos, Computer Based
-% Learning Unit, University of Leeds.}}.
+% information provided by the \Svn\ revision control system
+% (\texttt{http://subversion.tigris.org}).
% \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 revison control system like \emph{SCCS},
-% \emph{CVS}, or \SVN.
-% This package assumes you are using the \SVN\ system.
+% 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 the \Id\ keyword, which is expanded by the \SVN\
-% \emph{update} command and contains a
-% lot of useful information. This information is made available through
-% this package.
+% \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$|.
%
% The information obtained from the expanded \Id\ string are
% \begin{itemize}
% \item the filename,
% \item the revision number,
-% \item the date and time of the last \SVN\ \emph{co} command, and
+% \item the date and time of the last \Svn\ \emph{co} command, and
% \item name of the user who has done this action.
% \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
+% When \emph{updating} a file, the \Svn\ keywords should be contained in
+% 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
% \end{verbatim}
-% See the \SVN\ documentation for more details.
-% If the user wishes, the |\today| macro is redefined, so that it returns
-% the \SVN\ date.
+% See the \Svn\ documentation for more details.
%
% If you want to read about the implementation, put a \% before
% |\Only|\-|Description| in the code marked with |<*driver>| in the file
@@ -136,14 +143,18 @@
%
% \begin{description}
% \item[today]
-% Set the date of |\today| to the date obtained by the \SVN\ information.
+% 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
% used.
% \item[notoday]
-% Don't use the \SVN\ date for |\today|.
+% Don't use the \Svn\ date for |\svnToday|.
+% \item[revrange] For multi-file documents, display minimum and
+% maximium revision. 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.
% \item[fancyhdr]
% We use the \texttt{fancyhdr} package to fill the footline with
-% \SVN\ information: filename, revision-number and date.
+% \Svn\ information: filename, revision-number and date.
%
% If the \texttt{fancyhdr} package is not already loaded, it will be
% loaded
@@ -155,64 +166,86 @@
% \item[nofancy]
% We don't define the footline. The
% \texttt{fancyhdr} package is not loaded.
+% \item[scrpage2]
+% Use \texttt{scrpage2} instead of \texttt{fancyhdr}.
+% \item[eso-foot]
+% Use \texttt{eso-pic} for showing a tiny info line at the bottom
+% line of the paper.
% \item[long]
% If used together with \texttt{fancy} / \texttt{fancyhdr} the date
% string is printed in the long format
-% as |\today| returns it. If \texttt{fancy} / \texttt{fancyhdr}
+% as |\svnToday| returns it. If \texttt{fancy} / \texttt{fancyhdr}
% is not used, nothing.
% \item[short]
% If used together with \texttt{fancy} / \texttt{fancyhdr} the date
% string is printed in the short
% format \emph{YYYY-MM-DD}.
% If \texttt{fancy} / \texttt{fancyhdr} is not used, nothing.
+% \item[final] Don't define the footline. If you want the \Svn\ in the
+% final document, please use\\
+% \verb|\usepackage{draft}|
+% \item[draft] If \texttt{nofancy} is not used, show a footline with \Svn information.
% \end{description}
-% If the \texttt{babel} package is used, the |\today| string is language
+% If the \texttt{babel} package is used, the |\svnToday| string is language
% dependent.
%
-% The default options are: \emph{today,long}. In the configuration file
-% |svninfo.cfg| one of fancy heading packages may be set as a default
-% option too.
+% The default options are: \emph{draft,today,long}. You may also
+% configure the default fancy heading packages in the configuration
+% file |svninfo.cfg|.
%
%\subsection{Commands}
%
-% \subsubsection{Defining the \SVN\ information}
+% \subsubsection{Defining the \Svn\ Id information}
%
% There is only one macro to define the information:
-% |\svnInfo|\DescribeMacro{\svnInfo}.
-% Since it must collaborate with \SVN\ it has an ``unusual'' calling sequence:
-% The arguments are surrouned by \$.
+% |\svnInfo|\DescribeMacro{\svnInfo}. Since it must collaborate with
+% \Svn\ it has an ``unusual'' calling sequence: The arguments are
+% prefaced with a `\$' and completed with a `\$\blank' (note the final
+% space or carriage return).
% The following arguments are valid:\\
% \hspace*{0.5em} \SvnInfoCmd{}\\
% \hspace*{0.5em} \SvnInfoCmd{:}\\
-% \hspace*{0.5em} \SvnInfoCmd{:\blank\emph{file}\blank\emph{rev}\blank\emph{YYYY-MM-DD}\blank\emph{hh:mm:ss}\blank\emph{owner}}
+% \hspace*{0.5em}
+% \SvnInfoCmd{:\blank\emph{file}\blank\emph{rev}\blank\emph{YYYY-MM-DD}\blank\emph{hh:mm:ss}\blank\emph{owner}\blank}
%
-% In the first two forms, \SVN\ has not expanded the \Id\ string.
+% In the first two forms, \Svn\ has not expanded the \Id\ string.
% This form will usually be used before the file is \emph{checked in}
% the first time.
%
% \emph{YYYY-MM-DD} is a date, \emph{hh:mm:ss} a time.
-% Note: when you perform the \SVN\ \emph{check out} command, the \Id\ string
-% is expanded by \SVN\ automatically.
+% Note: when you perform the \Svn\ \emph{check out} command, the \Id\ string
+% is expanded by \Svn\ automatically.
%
% To take effect, |\svnInfo| must follow the |\begin{document}|.
% If you are using multiple files for a document, you could place
% |\svnInfo| at the
% beginning of each file, so the information from the current file is
-% obtained (this is not valid, when translating with \LatexToHtml, see below).
+% obtained.
%
-% \subsubsection{Accessing the \SVN\ information}
-% There are the following macros to access the information provided by \SVN.
-% If \SVN\ has not expanded the \Id\ string, or no |\svnInfo| command is given,
+% \subsubsection{Accessing the \Svn\ Id information}
+% There are the following macros to access the information provided by \Svn.
+% If \Svn\ has not expanded the \Id\ string, or no |\svnInfo| command is given,
% default values are returned.
%
% \begin{itemize}
% \item \DescribeMacro{\svnInfoFile} The name of the source file.
% Default: \texttt{--sourcefile--}.
-% \item \DescribeMacro{\svnInfoRevision} The \SVN\ revision number, of the
+% \item \DescribeMacro{\svnInfoRevision} The revision number, of the
% \emph{checked out} file.
% Default: \texttt{--revision--}.
+% \item \DescribeMacro{\svnInfoMinRevision} The minimum revision
+% 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
+% include a |\svnInfo| or a |\svnKeyword $Revision:$| statement.
+% This is information needs two runs of \LaTeX{} to be correct.
+% Default: \texttt{--maxrevision--}.
% \item \DescribeMacro{\svnInfoDate} The date in the form \emph{YYYY-MM-DD},
-% when the file was \emph{checked out}.
+% when the file was \emph{checked out}.
% Default: the current date.
% \item \DescribeMacro{\svnInfoTime} The time, when the file was
% \emph{checked out}.
@@ -226,90 +259,22 @@
% \item \DescribeMacro{\svnInfoDay} The day \emph{DD} of |\svnInfoDate|.
% Default: the current day.
% \item \DescribeMacro{\svnInfoLongDate} The date in the form of |\today|
-% when the file was \emph{checked out}. This is language dependend.
+% when the file was \emph{checked out}. This is language depended.
% Default: the current date.
-% \item \DescribeMacro{\svnId} Mimicks the behavior of the \Id\ strings, i.e.\ it
-% prints a string with a summary of the above described information.
-% \end{itemize}
-%
-% \subsection{\LatexToHtml}
-%
-% When converting a \LaTeX\ document to \texttt{HTML} using the
-% \LatexToHtml\ tool,
-% it's possible to use the \SVN\ information in the \texttt{HTML} document too.
-% This functionality is offered by the extension file \texttt{svninfo.perl}
-% which should be placed into the directory \texttt{LATEX2HTML/styles}.
-% For more information have a look at the documentation of \LatexToHtml.
-%
-% An example is given in the file \texttt{svninfo2html.tex}.
-%
-% \noindent\underline{Notes}
-% \begin{itemize}
-% \item Use at least version \emph{99.1 release (March 30, 1999)} of
-% \LatexToHtml.
-%
-% \item You should |\usepackage{html}|.
-%
-% \item You must run \LaTeX\ on the input file before running \LatexToHtml.
-%
-% \item In order to make \LatexToHtml\ read the \verb|.aux| file, you must
-% either:
-% \begin{itemize}
-% \item call \LatexToHtml\ with the option
-% \verb|-show_section_numbers| or
-% \item include the \verb|.aux| file explicitly in your \LaTeX-source, by
-% adding the lines in the preamble:\\
-% \verb|\begin{htmlonly}|\\
-% \verb|\input{|\emph{source}\verb|.aux}|\\
-% \verb|\end{htmlonly}|\\
-% which requires \verb|\usepackage{html}|.
-% \end{itemize}
-% If you don't do so, the \verb|\svnInfo...| commands give no value.
-%
-% \item If using the \LatexToHtml\ tool, only the last |\svnInfo| takes
-% effect, e.g.~if using several input files each having the |\svnInfo|
-% command, only the vales of the last included file are used.
-% (If this is a serious problem for you, drop me a mail).
-%
-% \item If the \verb|fancy| / \verb|fancyhdr| option is given to the
-% \verb|svninfo| package,
-% the date of the \verb|ADDRESS| at the bottom of the \texttt{HTML}
-% page is set to the \SVN\ date.
-%
-% \item If you would like to set your own \verb|ADDRESS| text, you should
-% define a procedure, which sets \texttt{perl} \verb|$main::ADDRESS|
-% variable in your local \texttt{.latex2html} initialization file.
-% The routine may use the \texttt{perl}
-% variables shown below. Assign a reference of this procdure to the
-% \texttt{perl}-variable
-% \verb|$svninfo::SetAddressProc|.
-% E.g.\ if you have a \texttt{perl} routine \verb|&my_address_field|,
-% then \\
-% \verb|$svninfo::SetAddressProc = &my_address_field|.
+% \item \DescribeMacro{\svnId} Mimics the behavior of the \Id\ strings, i.e.\ it
+% prints a string with a summary of the above described
+% information.
+% \item \DescribeMacro{\svnToday} The date obtained from the \Svn\ information
+% in the format |\today| is using.
% \end{itemize}
-%
-% \newcommand{\Var}[1]{\texttt{\$svninfo::#1}}
-% \noindent
-% Here are the commands, the Perl-variables and their output:\\
-% \begin{tabular}{lll}
-% \LaTeX-command & \texttt{perl} variable & Result for this file \\\hline
-% \verb|\today| & \texttt{\$today} & \today \\
-% \verb|\svnInfoFile| & \Var{File} & \svnInfoFile \\
-% \verb|\svnInfoRevision| & \Var{Revision} & \svnInfoRevision \\
-% \verb|\svnInfoOwner| & \Var{Owner} & \svnInfoOwner \\
-% \verb|\svnInfoDate| & \Var{Date} & \svnInfoDate \\
-% \verb|\svnInfoLongDate| & \Var{LongDate} & \svnInfoLongDate \\
-% \verb|\svnInfoDay| & \Var{Day} & \svnInfoDay \\
-% \verb|\svnInfoMonth| & \Var{Month} & \svnInfoMonth \\
-% \verb|\svnInfoYear| & \Var{Year} & \svnInfoYear \\
-% \end{tabular}
-%
% \section{Examples}
%
% \newcommand{\svnExample}{
% \begin{tabular}[t]{rl}
% \Cmd{svnInfoFile} & \svnInfoFile \\
% \Cmd{svnInfoRevision} & \svnInfoRevision \\
+% \Cmd{svnInfoMinRevision} & \svnInfoMinRevision \\
+% \Cmd{svnInfoMaxRevision} & \svnInfoMaxRevision \\
% \Cmd{svnInfoDate} & \svnInfoDate \\
% \Cmd{svnInfoTime} & \svnInfoTime \\
% \Cmd{svnInfoOwner} & \svnInfoOwner \\
@@ -319,7 +284,7 @@
% \Cmd{svnInfoMonth} & \svnInfoMonth \\
% \Cmd{svnInfoDay} & \svnInfoDay \\
% \Cmd{svnInfoLongDate} & \svnInfoLongDate \\
-% \Cmd{today} & \today \\
+% \Cmd{svnToday} & \svnToday \\
% \end{tabular}\\
% \Cmd{svnId} \svnId
% \bigskip
@@ -339,38 +304,103 @@
% |\svnInfo| standard version\\
% {\small\verb+\svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $+}\\
% \svnExample
-%
+%
% \svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z $
% |\svnInfo| standard version without owner\\
% {\small\verb+\svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z $+}\\
% \svnExample
%
+% \svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z infsec\brucker $
+% |\svnInfo| standard version with \\ in the owner \\
+% {\small\verb+\svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $+}\\
+% \svnExample
+%
% \svnInfo Id: svninfo.dtx 12 2002-04-19 12:27:55 brucker $
% |\svnInfo| no leading \$\\
% {\footnotesize\verb+\svnInfo Id: svninfo.dtx 12 2002-04-19 12:27:55 brucker $+}\\
% \svnExample
%
+% \section{The generic \Svn\ keyword interface}
+% In addition to the already presented |\svnInfo| macro which is
+% specially built for analyzing the \Svn |$Id$| information we also
+% provide a generic interface via
+% |\svnKeyword|\DescribeMacro{\svnKeyword}. This interface can
+% be used to extract information from the remaining keywords:
+% \begin{itemize}
+% \item |$Date$|: The date of the last commit with changes. This
+% information can also be accessed using the keyword
+% |$LastChangedDate$|.
+% \item |$Revision$|: The revision of the last commit with
+% changes. This information can also be accessed using the keyword
+% |$LastChangedRevision$| or |$Rev$|.
+% \item |$Author$|: The author of the last commit with changes. This
+% information can also be accessed using the keyword
+% |$LastChangeBy$|.
+% \item |$HeadURL$|: The the full URL to the latest version of the
+% file in the repository. This information can also be accessed
+% using the keyword |$URL$|.
+% \end{itemize}
+% These keywords can be accessed using the |\svnKeyword|
+% macro. This macro accepts a single argument that should be of the
+% form |$|\meta{Keyword}|$| (unexpanded) or
+% |$|\meta{Keyword}:\blank\meta{value}\blank|$| (expanded), e.g.:
+% \begin{verbatim}
+% \svnKeyword $Author: brucker $
+% \end{verbatim}
+% The |\svnKeyword| updates the corresponding \Svn\ Id
+% information, e.g., our example updates |\svnInfoOwner|. In more
+% detail:
+% \begin{itemize}
+% \item |\svnKeyword $Date:$| updates the date and time
+% informations, e.g., |\svnInfoDate|\DescribeMacro{\svnInfoDate},
+% |\svnInfoMonth|\DescribeMacro{\svnInfoMonth}, or
+% |\svnInfoTime|\DescribeMacro{\svnInfoTime}.
+% \item |\svnKeyword $Revision:$| updates
+% |\svnInfoRevision|\DescribeMacro{\svnInfoRevision}.
+% \item |\svnKeyword $Author:$| updates
+% |\svnInfoOwner|\DescribeMacro{\svnInfoOwner}.
+% \item |\svnKeyword $HeadURL:$| updates
+% |\svnInfoHeadURL|\DescribeMacro{\svnInfoHeadURL}.
+% \end{itemize}
+%
+% Note, the parser used by |\svnKeyword| is not that powerful than
+% the one used by |\svnInfo|. Thus it is advisable to use
+% |\svnKeywordId| for the |$Id$| keyword and |\svnKeyword|
+% only for the keywords described in this section.
+%
+% Further, the |\svnKeyword| macro does not reset all keyword
+% definitions globally, i.e., you can combine the |$Revision$|
+% of one file, with the |$Author$| of another file. Please take
+% care of that!
+%
% \section{Acknowledgements}
% %%%%%%%%%%%%%%%%%%%%%%%%%
-% This package is directly based on \texttt{rcsinfo} from
-% Dr.~J{\"u}rgen Vollmer which is distributed via the CTAN archives
-% in directory '\texttt{macros/latex/contrib/rcsinfo}'. All the honour
-% belongs to him, I only adopted his code to the format of the
-% \verb+Id+ line subversion uses % and removed the support for
-% the outdated fancyheadings package.
+% This package is based on \texttt{rcsinfo} from Dr.~J{\"u}rgen
+% Vollmer. The \texttt{rcsinfo} package is distributed via the CTAN
+% archives ('\texttt{macros/latex/contrib/rcsinfo}').
+%
+% The code for parsing generic \Svn{} keywords was taken from the
+% \texttt{svn} packages written by Richard Lewis. The \texttt{svn}
+% package is distributed via the CTAN archives
+% ('\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.
%
% \section{Copyright and License}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \begin{tabular}{ll}
% Copyright (\copyright) 1995 & Dr. J{\"u}rgen Vollmer\\
-% Copyright (\copyright) 2003--2005 & Achim D.~Brucker \texttt{brucker@freiburg.linux.de}\\
+% Copyright (\copyright) 2003--2006 & Achim D.~Brucker \texttt{brucker@freiburg.linux.de}\\
% \end{tabular}
%
% \noindent This program can be redistributed and/or modified under
-% the terms of the \LaTeX Project Public License Distributed from CTAN
-% archives in directory '\texttt{macros/latex/base/lppl.txt}'; either
-% version 1 of the License, or any later version.
+% the terms of the \LaTeX{} Project Public License Distributed from
+% CTAN archives in directory '\texttt{macros/latex/base/lppl.txt}';
+% either version 1 of the License, or any later version.
%
% \StopEventually{}
%
@@ -388,7 +418,7 @@
%<*driver>
\documentclass{article}
\usepackage{doc}
-\usepackage{svninfo}
+\usepackage[nofancy]{svninfo}
\OnlyDescription
\makeatletter
\if@svnInfoUseFancyhdr@
@@ -436,38 +466,29 @@
% \section{The Implementation}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% The implementation is based on cracking the \Id\ string. To support
-% \LatexToHtml\ some macro definitions are written to the |.aux| file.
-% These macros are the used by \LatexToHtml\ and |svninfo.perl| to extract
-% the \SVN\ info.
+% The implementation is based on cracking the \Id\ string.
%
% What do we need, and who we are:
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{svninfo}[2005/09/29 v0.3]
+\ProvidesPackage{svninfo}[2006/05/11 v0.6]
% \end{macrocode}
%
-% Declare some local counters to store the \SVN\ date
+% Declare some local counters to store the \Svn\ date
% \begin{macrocode}
\newcount\@svnInfoDay
\newcount\@svnInfoMonth
\newcount\@svnInfoYear
% \end{macrocode}
-% Declare some local counters to hold some temporary information
-% \begin{macrocode}
-\newcount\@svnInfoYearTmp
-\newcount\@svnInfoMonthTmp
-\newcount\@svnInfoDayTmp
-% \end{macrocode}
%
-% To memorize, that we want to set |\today| to the date obtained by the
-% \SVN\ information.
+% To memorize, that we want to set |\svnToday| to the date obtained by the
+% \Svn\ information.
% \begin{macrocode}
\newif\if@svnInfoToday@
% \end{macrocode}
%
-% |\today| should return the date obtained by the \SVN\ information.
+% |\svnToday| should return the date obtained by the \Svn\ information.
% \begin{macrocode}
\DeclareOption{today}{
\@svnInfoToday@true
@@ -480,29 +501,78 @@
\@svnInfoToday@false
}
% \end{macrocode}
+% To memorize if we should show ranges of revision (for multiple-file
+% documents):
+% \begin{macrocode}
+\newif\if@svnInfoRevRange@
+\@svnInfoRevRange@false
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{revrange}{
+ \@svnInfoRevRange@true
+}
+% \end{macrocode}
+% \begin{macrocode}
+% To memorize if we are in final or draft mode:
+% \begin{macrocode}
+\newif\if@svnInfoDraft@
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareOption{final}{
+ \@svnInfoDraft@false
+}
+\DeclareOption{draft}{
+ \@svnInfoDraft@true
+}
+% \end{macrocode}
%
-% To memorize, that we want to have the the new
-% \texttt{fancyhdr} footline filled with \SVN\ information.
+% To memorize, that we want to have the old \texttt{fancyheadings}, the new
+% \texttt{fancyhdr}, or \texttt{srcpage2}, or \texttt{eso-pic}
+% footline filled with \Svn\ information.
% \begin{macrocode}
+\newif\if@svnInfoUseFancy@
\newif\if@svnInfoUseFancyhdr@
+\newif\if@svnInfoUseScrpage@
+\newif\if@svnInfoUseEsofoot@
% \end{macrocode}
%
% We want to use the \texttt{fancyhdr}
-% package, and set the footline with the \SVN\ information.
+% package, and set the footline with the \Svn\ information.
% Only one option may be in effect.
% \begin{macrocode}
\DeclareOption{fancy}{
+ \@svnInfoUseFancy@true
\@svnInfoUseFancyhdr@false
+ \@svnInfoUseScrpage@false
+ \@svnInfoUseEsofoot@false
}
\DeclareOption{fancyhdr}{
+ \@svnInfoUseFancy@false
\@svnInfoUseFancyhdr@true
+ \@svnInfoUseScrpage@false
+ \@svnInfoUseEsofoot@false
+}
+\DeclareOption{scrpage}{
+ \@svnInfoUseFancy@false
+ \@svnInfoUseFancyhdr@false
+ \@svnInfoUseScrpage@true
+ \@svnInfoUseEsofoot@false
+}
+\DeclareOption{eso-foot}{
+ \@svnInfoUseFancy@false
+ \@svnInfoUseFancyhdr@false
+ \@svnInfoUseScrpage@false
+ \@svnInfoUseEsofoot@true
}
% \end{macrocode}
%
% Ok we don't want do use it.
% \begin{macrocode}
\DeclareOption{nofancy}{
+ \@svnInfoUseFancy@false
\@svnInfoUseFancyhdr@false
+ \@svnInfoUseScrpage@false
+ \@svnInfoUseEsofoot@false
}
% \end{macrocode}
%
@@ -527,7 +597,7 @@
%
% Use these default options,
% \begin{macrocode}
-\ExecuteOptions{today,long}
+\ExecuteOptions{draft,today,long}
% \end{macrocode}
%
% read the configuration file, to set the default fancy headings package,
@@ -537,20 +607,35 @@
%
% and the process the user options.
% \begin{macrocode}
-\ProcessOptions
+\ProcessOptions*\relax
% \end{macrocode}
-% Load \texttt{fancyhdr} if neccessary.
+% Load packages for page headers of footers if necessary.
% \begin{macrocode}
-\if@svnInfoUseFancyhdr@
- \RequirePackage{fancyhdr}
-\fi
+\if@svnInfoDraft@
+ \if@svnInfoUseFancy@
+ \RequirePackage{fancyheadings}
+ \fi
+ \if@svnInfoUseFancyhdr@
+ \RequirePackage{fancyhdr}
+ \fi
+ \if@svnInfoUseScrpage@
+ \RequirePackage{scrpage2}
+ \fi
+ \if@svnInfoUseEsofoot@
+ \RequirePackage{eso-pic}
+ \fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{ifthen}
% \end{macrocode}
%
% If no language for the |babel| package is given in the document,
-% we have to redefine |\today| (otherwise the changed |\year|, |\month| and
-% |\day| won't work). In this case use the english version of |\today|.
+% we have to redefine |\svnToday| (otherwise the changed |\year|, |\month| and
+% |\day| won't work). In this case use the English version of |\svnToday|.
% \begin{macrocode}
-\def\today{\ifcase\month\or
+\def\svnToday{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
@@ -558,34 +643,32 @@
%
% We have a problem, since the number of arguments of |\svnInfo| vary from
% zero to five.
-% To deal with that, we use some kind ``contuinuation passing'' style of
+% To deal with that, we use some kind ``continuation passing'' style of
% programming.
% |\@svnInfoNext| contains the action to be done next.
%
-% Some packages (e.g.\ the |babel|-package with the |french|-option)
-% change the catcode of |:| (colon). If this happens, we have to
-% undo this in order to parse the \Id\ string (which contains a colon)
-% and restore its original catcode afterwards.
-% This flag is used to store whether the state of the colon was changed to
-% be active.
-% \begin{macrocode}
-\newif\if@svnInfoColonIsActive@
-% \end{macrocode}
%\begin{macro}{\svnInfo}
-% Extract the \SVN\ information, and give commands shown above their values.
+% Extract the \Svn\ information, and give commands shown above their values.
% Check the catcode of |:| and set the flag. The restoration is done after the
% |:| has been read. Allow \_ (underscore) in file names, hence change the
% |\catcode| of it.
% \begin{macrocode}
-\def\svnInfo {
- \catcode`\_=13
- \ifnum\catcode`\:=13
- \@svnInfoColonIsActive@true
- \catcode`:=12
- \else
- \@svnInfoColonIsActive@false
- \fi
+
+%
+% Whenever reading another portion of the SVN/RCS info,
+% expand \@svnBeginRead before calling the reading macro
+% and call \@svnEndRead as first thing inside the reading macro.
+\def\@svnBeginRead{\begingroup
+ \catcode`\_=13 %
+ \catcode`:=12 %
+ \catcode`\\=12 %
+}
+\def\@svnEndRead{\endgroup
+}
+
+
+\def\svnInfo {\@svnBeginRead
\@svnInfoReadArgs
}
% \end{macrocode}
@@ -598,22 +681,14 @@
% \$Id-Tags to be expanded by SVN in some cases).
% Restore the catcode of the |:|.
% \begin{macrocode}
-\def\@svnInfoReadArgs #1Id#2 {
+
+\def\@svnInfoReadArgs #1Id#2 {\@svnEndRead
\@svnInfoDefaults
- \if $#2 \let \@svnInfoNext = \@svnInfoEat
- \else \let \@svnInfoNext = \@svnInfoEatColon
+ \if $#2 \expandafter\@svnInfoEat
+ \else \@svnBeginRead
+ \expandafter\@svnInfoEatColon
\fi
-% \end{macrocode}
-% |#2| contains either |$| or |:$| or |:|\blank\ hence we have read the colon
-% and can restore the catode of it.
-% \begin{macrocode}
- \if@svnInfoColonIsActive@
- \catcode`:=13
- \fi
-% \end{macrocode}
-% Start processing the \Id\ string.
-% \begin{macrocode}
- \@svnInfoNext $Id#2
+ $Id#2 %
}
% \end{macrocode}
%\end{macro}
@@ -622,7 +697,7 @@
% This macro eats up its argument, i.e.\ removes it from the input.
% Reset the |\catcode| of the underscore.
% \begin{macrocode}
-\def\@svnInfoEat #1 {\catcode`\_=8}
+\def\@svnInfoEat #1 {}
% \end{macrocode}
%\end{macro}
@@ -631,11 +706,12 @@
% The colon may be followed by a \$, which means that the \Id\ string is not
% expanded.
% \begin{macrocode}
-\def\@svnInfoEatColon $Id:#1 {
- \if $#1 \let \@svnInfoNext = \@svnInfoEat
- \else \let \@svnInfoNext = \@svnInfoCrackAndEat
+\def\@svnInfoEatColon $Id:#1 {\@svnEndRead
+ \if $#1 \expandafter\@svnInfoEat
+ \else \@svnBeginRead
+ \expandafter\@svnInfoCrackAndEat
\fi
- \@svnInfoNext #1
+ #1 %
}
% \end{macrocode}
%\end{macro}
@@ -649,9 +725,8 @@
% We have to take the next 7 tokens.
% Note, first argument (\verb|#1|) contains only spaces.
% \begin{macrocode}
-\def\@svnInfoCrackAndEat #1 #2 #3 #4 #5 #6 {
- \@svnInfoCrackString #2 #3 #4 #5 #6
- \@svnInfoNext
+\def\@svnInfoCrackAndEat #1 #2 #3 #4 #5 #6 {\@svnEndRead
+ \@svnInfoCrackString #2 #3 #4 #5 #6 %
}
% \end{macrocode}
%\end{macro}
@@ -667,36 +742,32 @@
% we already consumed the terminating \$.
%
% Split the date into year,month and day.
-% If the option \texttt{today} is given, |\today| returns from now
-% on the \SVN\ date.
+% If the option \texttt{today} is given, |\svnToday| returns from now
+% on the \Svn\ date.
%
-% Write some macro definitions to the |.aux| file, to support \LatexToHtml.
% \begin{macrocode}
-\def\@svnInfoCrackString #1 #2 #3 #4 #5 {
- \def\svnInfoFile{#1}
- \def\svnInfoRevision{#2}
- \def\svnInfoTime{#4}
- \if $#5 \let \@svnInfoNext = \relax
- \def\svnInfoOwner{}
- \def\svnId{#1\ #2\ #3\ #4}
- \else \let \@svnInfoNext = \@svnInfoEat
- \def\svnInfoOwner{#5}
- \def\svnId{#1\ #2\ #3\ #4\ #5}
- \fi
- \write\@mainaux{\string\def\string\svnInfoFILE{#1}}
- \write\@mainaux{\string\def\string\svnInfoREVISION{#2}}
- \write\@mainaux{\string\def\string\svnInfoTIME{#4}}
- \write\@mainaux{\string\def\string\svnInfoOWNER{#5}}
-
-
-
- \catcode`\_=8
- \@svnInfoSplitDate x#3x
- \def\svnInfoLongDate{\@svnInfoToday}
+\def\@svnInfoCrackString #1 #2 #3 #4 #5 {%
+ \def\svnInfoFile{#1}%
+ \def\svnInfoRevision{#2}%
+ \ifthenelse{\(\equal{\svnInfoMaxRevision}{--maxrevision--}\) %
+ \OR \( #2 > \svnInfoMaxRevision \)}{\def\svnInfoMaxRevision{#2}}{}%
+ \ifthenelse{\(\equal{\svnInfoMinRevision}{--minrevision--}\) %
+ \OR \( #2 < \svnInfoMinRevision \)}{\def\svnInfoMinRevision{#2}}{}%
+ \def\svnInfoTime{#4}%
+%
+ \@svnInfoSplitDate x#3x%
+ \def\svnInfoLongDate{\@svnInfoToday}%
\if@svnInfoToday@
- \year = \@svnInfoYear
- \month = \@svnInfoMonth
- \day = \@svnInfoDay
+ \year =\@svnInfoYear
+ \month =\@svnInfoMonth
+ \day =\@svnInfoDay
+ \fi
+ \if $#5 \def\svnInfoOwner{}%$%
+ \def\svnId{#1\ #2\ #3\ #4}%
+ \else
+ \def\svnInfoOwner{#5}%
+ \def\svnId{#1\ #2\ #3\ #4\ #5}%
+ \expandafter\@svnInfoEat
\fi
}
% \end{macrocode}
@@ -706,110 +777,139 @@
% 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
- \@svnInfoMonth= #2
- \@svnInfoYear = #1
- \write\@mainaux{\string\def\string\svnInfoDAY{#3}}
- \write\@mainaux{\string\def\string\svnInfoMONTH{#2}}
- \write\@mainaux{\string\def\string\svnInfoYEAR{#1}}
+\def\@svnInfoSplitDate x#1-#2-#3x{%
+ \@svnInfoDay =#3\relax
+ \@svnInfoMonth=#2\relax
+ \@svnInfoYear =#1\relax
}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@svnInfoToday}
-% Returns the \SVN\ date in the form as |\today| does it.
+% Returns the \Svn\ date in the form as |\today| does it.
% To do this, we set |\year|, |\month| and |\day| commands to the
-% corresponding \SVN\ information, let |\today| does its work, i.e.\
+% corresponding \Svn\ information, let |\svnToday| does its work, i.e.\
% transforming the date into a language dependent string and reset
% |\year|, |\month| and |\day| to their previous value.
%
% \begin{macrocode}
\def\@svnInfoToday {%
- \@svnInfoYearTmp = \year
- \@svnInfoMonthTmp = \month
- \@svnInfoDayTmp = \day
- \year = \@svnInfoYear
- \month = \@svnInfoMonth
- \day = \@svnInfoDay
- \today%
- \year = \@svnInfoYearTmp
- \month = \@svnInfoMonthTmp
- \day = \@svnInfoDayTmp
+ \begingroup
+ \year =\@svnInfoYear
+ \month =\@svnInfoMonth
+ \day =\@svnInfoDay
+ \svnToday
+ \endgroup
}
+
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@svnInfoDefaults}
% This macro sets the default values.
% \begin{macrocode}
-\def\@svnInfoDefaults {
- \@svnInfoYear = \year
- \@svnInfoMonth = \month
- \@svnInfoDay = \day
- \def\svnInfoFile{--sourcefile--}
+\def\@svnInfoDefaults {%
+ \@svnInfoYear =\year
+ \@svnInfoMonth =\month
+ \@svnInfoDay =\day
+ \def\svnInfoFile{--sourcefile--}%
+ \def\svnInfoHeadURL{--head-url--}%
\def\svnInfoDate{\the\@svnInfoYear-\two@digits\@svnInfoMonth-%
- \two@digits\@svnInfoDay}
- \def\svnInfoTime{--time--}
- \def\svnInfoRevision{--revision--}
- \def\svnInfoOwner{--owner--}
- \def\svnInfoYear{\the\@svnInfoYear}
- \def\svnInfoMonth{\the\@svnInfoMonth}
- \def\svnInfoDay{\the\@svnInfoDay}
- \def\svnInfoLongDate{\@svnInfoToday}
- \def\svnId{\svnInfoFile\ \svnInfoRevision\ \svnInfoTime\ \svnInfoOwner}
+ \two@digits\@svnInfoDay}%
+ \def\svnInfoTime{--time--}%
+ \def\svnInfoRevision{--revision--}%
+ \ifthenelse{\isundefined{\svnInfoMinRevision}}{\def\svnInfoMinRevision{--minrevision--}}{}%
+ \ifthenelse{\isundefined{\svnInfoMaxRevision}}{\def\svnInfoMaxRevision{--maxrevision--}}{}%
+ \def\svnInfoOwner{--owner--}%
+ \def\svnInfoYear{\the\@svnInfoYear}%
+ \def\svnInfoMonth{\the\@svnInfoMonth}%
+ \def\svnInfoDay{\the\@svnInfoDay}%
+ \def\svnInfoLongDate{\@svnInfoToday}%
+ \def\svnId{\svnInfoFile\ \svnInfoRevision\ \svnInfoTime\ \svnInfoOwner}%
}
+
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\@svnInfoFancyFoot}
% This defines the contents of the footline
% \begin{macrocode}
-\def\@svnInfoFancyFoot {
+\def\@svnInfoFancyFoot {%
+ \if@svnInfoRevRange@
+ \def\@svnInfoRevisionRange{{ (\svnInfoMinRevision : \svnInfoMaxRevision)}}%
+ \else
+ \def\@svnInfoRevisionRange{\relax}%
+ \fi
\if@svnInfoLong@
- \def\@svnInfoFancyInfo{{\footnotesize%
- \emph{Rev: \svnInfoRevision,
- \svnInfoLongDate}}}
+ \def\@svnInfoFancyInfo{{\footnotesize
+ \emph{Rev: \svnInfoRevision\@svnInfoRevisionRange, %
+ \svnInfoLongDate}}}%
\else
- \def\@svnInfoFancyInfo{{\footnotesize%
- \emph{Rev: \svnInfoRevision,
- \svnInfoDate}}}
+ \def\@svnInfoFancyInfo{{\footnotesize
+ \emph{Rev: \svnInfoRevision\@svnInfoRevisionRange, %
+ \svnInfoDate}}}%
\fi
- \def\@svnInfoFancyFile{{\footnotesize\emph{\svnInfoFile}}}
+ \def\@svnInfoFancyFile{{\footnotesize\emph{\svnInfoFile}}}%
% \end{macrocode}
-% and set it for the \texttt{fancyhdr} package.
+% and set it for the \texttt{fancyheadings} package,
+% package page style.
% \begin{macrocode}
+ \if@svnInfoDraft@
+ \if@svnInfoUseFancy@
+ \rfoot[\fancyplain{\@svnInfoFancyFile}{\@svnInfoFancyFile}]%
+ {\fancyplain{\@svnInfoFancyInfo}{\@svnInfoFancyInfo}}%
+ \lfoot[\fancyplain{\@svnInfoFancyInfo}{\@svnInfoFancyInfo}]%
+ {\fancyplain{\@svnInfoFancyFile}{\@svnInfoFancyFile}}%
+ \setlength{\footrulewidth}{0.4pt}%
+ \setlength{\plainfootrulewidth}{0.4pt}%
+ \fi
+ \fi
+% \end{macrocode}
+% for the \texttt{fancyhdr} package,
+% \begin{macrocode}
+ \if@svnInfoDraft@
\if@svnInfoUseFancyhdr@
- \if@twoside
- \fancyfoot[LE,RO]{\@svnInfoFancyInfo}
- \fancyfoot[LO,RE]{\@svnInfoFancyFile}
- \fancyfoot[CO,CE]{\thepage}
- \else
- \fancyfoot[L,RO]{\@svnInfoFancyInfo}
- \fancyfoot[LO,R]{\@svnInfoFancyFile}
- \fancyfoot[C]{\thepage}
- \fi
- \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}
+ \fancyfoot[LE,RO]{\@svnInfoFancyInfo}%
+ \fancyfoot[LO,RE]{\@svnInfoFancyFile}%
+ \fancyfoot[CO,CE]{\thepage}%
+ \renewcommand{\footrulewidth}{0.4pt}%
}
- \else
- \fancypagestyle{plain}{%
- \fancyfoot[L,RO]{\@svnInfoFancyInfo}
- \fancyfoot[LO,R]{\@svnInfoFancyFile}
- \fancyfoot[C]{\thepage}
- \renewcommand{\footrulewidth}{0.4pt}
- }
- \fi
\fi
+ \fi
+% \end{macrocode}
+% for the \texttt{srcpage2} package,
+% \begin{macrocode}
+ \if@svnInfoDraft@
+\if@svnInfoUseScrpage@
+ \clearscrheadfoot%
+ \ohead{\headmark}%
+ \cfoot[\emph{\@svnInfoFancyInfo}]{\emph{\@svnInfoFancyInfo}}%
+ \ifoot[\@svnInfoFancyFile]{\@svnInfoFancyFile}%
+ \ofoot[\pagemark]{\pagemark}%
+ \pagestyle{scrheadings}%
+ \fi
+\fi
+% \end{macrocode}
+% for the \texttt{eso-pic} package,
+% \begin{macrocode}
+ \if@svnInfoDraft@
+ \if@svnInfoUseEsofoot@
+ \AddToShipoutPicture{%
+ \setlength{\unitlength}{1mm}%
+ \put(5,5){\tiny\svnInfoFile\quad\svnInfoRevision\quad\svnInfoDate%
+ \quad\svnInfoTime\quad\svnInfoOwner}%
+ }
+\fi
+\fi
}
% \end{macrocode}
%\end{macro}
-
+%
% Initialize the defaults
% \begin{macrocode}
\@svnInfoDefaults
@@ -818,13 +918,260 @@
% At the start of the document, if we use the
% \texttt{fancyhdr} footline, we should set it here.
% \begin{macrocode}
-\AtBeginDocument{
+\AtBeginDocument{%
+ \if@svnInfoDraft@
+ \if@svnInfoUseFancy@
+ \@svnInfoFancyFoot
+ \fi
\if@svnInfoUseFancyhdr@
\@svnInfoFancyFoot
\fi
+ \if@svnInfoUseScrpage@
+ \@svnInfoFancyFoot
+ \fi
+ \if@svnInfoUseEsofoot@
+ \@svnInfoFancyFoot
+ \fi
+\fi
+}
+% \end{macrocode}
+% At the end of the document
+% \begin{macrocode}
+\AtEndDocument{%
+ \immediate\write\@mainaux{\string\gdef\string\svnInfoMinRevision{\svnInfoMinRevision}}%
+ \immediate\write\@mainaux{\string\gdef\string\svnInfoMaxRevision{\svnInfoMaxRevision}}%
+}
+% \end{macrocode}
+%\subsection{The generic \texttt{\string\svnKeyword} command}
+% \begin{macro}{\svnKeyword}
+% |\svnKeyword| is the main construct. The single argument
+% should be of the form |$|\meta{Keyword}|$| or
+% |$|\meta{Keyword}:\meta{space}\meta{value}\meta{space}|$|, where
+% \meta{Keyword} and \meta{value} must be non-empty as well as
+% brace- and |\if|--|\fi|- balanced. \meta{space} is a single space
+% (if more are present they will be subsumed into \meta{value}). If
+% `|$empty$|', `|$generic$|', |$Time$| or ever become keywords, or
+% if keywords containing |@| ever exist then we may have problems.
+% \begin{macrocode}
+\def\svnKeyword $#1${\svn@$#1: $}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svnKeywordempty}
+% If \meta{Keyword} is unexpanded then |\svnKeywordKeyword| is
+% set to the macro |\svnKeywordempty|, which is initially empty.
+% \begin{macrocode}
+\let\svnKeywordempty\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svn@}
+% \begin{macro}{\svn@tmp}
+% |\svn@| does the work for |\svnKeyword|. It takes two
+% arguments, the first is the \meta{Keyword}'s name, the second is
+% empty (in which case \meta{Keyword} was unexpanded) or
+% \meta{value}, the expansion of \meta{keyword}.
+% \begin{macrocode}
+\def\svn@$#1: #2${%
+ \def\svn@tmp{#2}%
+% \end{macrocode}
+% \begin{macro}{\svn@suffix}
+% If \param2 is empty, then the keyword was unexpanded and
+% |\svn@suffix| is set to |@unexp|, otherwise we had an
+% expanded keyword so |\svn@suffix| is set to |@exp|.
+% \begin{macrocode}
+ \ifx\svn@tmp\@empty
+ \def\svn@suffix{@unexp}%
+ \else
+ \def\svn@suffix{@exp}%
+ \fi
+% \end{macrocode}
+% If |\svnKeyword@|\param1\meta{suffix} is defined then run it
+% with arguments `\param1\param2', else run
+% |\svnKeyword@generic@|\meta{suffix} (again with argument
+% \param1\param2---by default this defines `|\svnKeyword|\meta{\param1}' to
+% be \param2, or |\svnKeywordempty| in the unexpanded case).
+% \begin{macrocode}
+ \@ifundefined{svnKeyword@#1\svn@suffix}%
+ {\@nameuse{svnKeyword@generic\svn@suffix}{#1}{#2}}%
+ {\@nameuse{svnKeyword@#1\svn@suffix}{#1}{#2}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \subsubsection{Dealing with general \texttt{\string$Keyword\string$}s}
+% \begin{macro}{\svnKeyword@generic@exp}
+% When we see |\svnKeyword $KeyWord: <stuff> $|, and
+% |\svnKeyword@KeyWord@exp| is undefined, then we define the macro
+% |\svnKeywordKeyWord| to be |<stuff>| using
+% |\svnKeyword@generic@exp{KeyWord}{<stuff>}|.
+% \begin{macrocode}
+\def\svnKeyword@generic@exp#1#2{%
+ \expandafter\svn@set\csname svnKeyword#1\endcsname$#2$%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@generic@unexp}
+% When we see |\svnKeyword $KeyWord$| and
+% |\svnKeyword@KeyWord@unexp| is undefined, we define
+% |\svnKeywordKeyWord| to be |\svnKeywordempty| using
+% |\svnKeyword@generic@unexp{KeyWord}|.
+% \begin{macrocode}
+\def\svnKeyword@generic@unexp#1#2{%
+ \expandafter\global\expandafter\let\csname svnKeyword#1\endcsname\svnKeywordempty
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svn@set}
+% |\svn@set#1$#2$| defines the command in \param{1} to be \param{2}
+% without the trailing `\verb*| : |' that the call to |\svn@| added.
+% \begin{macrocode}
+\def\svn@set#1$#2 : ${\gdef#1{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Dealing with the \texttt{\string$Date\string$} keyword}
+% \begin{macro}{\svnKeyword@Date@unexp}
+% \begin{macro}{\svnKeyword@LastChangedDate@unexp}
+% \begin{macrocode}
+\def\svnKeyword@Date@unexp#1#2{}%
+\let\svnKeyword@LastChangedDate@unexp\svnKeyword@Date@unexp%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@Date@exp}
+% \begin{macro}{\svnKeyword@LastChangedDate@exp}
+% \begin{macrocode}
+\def\svnKeyword@Date@exp#1#2{%
+ \svn@parse@date$#2$%
+}%
+\let\svnKeyword@LastChangedDate@exp\svnKeyword@Date@exp
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\svn@parse@date}
+% \begin{macrocode}
+\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}%
}
+% \end{macrocode}
+% \end{macro}
+
+% \subsubsection{Dealing with the \texttt{\string$Id\string$} keyword}
+% \begin{macro}{\svnKeyword@Id@unexp}
+% \begin{macrocode}
+\def\svnKeyword@Id@unexp#1#2{}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@Id@exp}
+% \begin{macrocode}
+\def\svnKeyword@Id@exp#1#2{%
+ \svn@parse@id$#2$
+}%
+\def\svn@parse@id$#1 : ${%
+ \svnInfo $Id: #1 $ %
+}%
+% \end{macrocode}
+% \end{macro}
+
+% \subsubsection{Dealing with the \texttt{\string$Author\string$} keyword}
+% \begin{macro}{\svnKeyword@Author@unexp}
+% \begin{macro}{\svnKeyword@LastChangedBy@exp}
+% \begin{macrocode}
+\def\svnKeyword@Author@unexp#1#2{}%
+\let\svnKeyword@LastChangedBy@unexp\svnKeyword@Author@unexp%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@Author@exp}
+% \begin{macro}{\svnKeyword@LastChangedBy@exp}
+% \begin{macrocode}
+\def\svnKeyword@Author@exp#1#2{%
+ \svn@parse@Author$#2$
+}%
+\def\svn@parse@Author$#1 : ${%
+ \def\svnInfoOwner{#1}%
+}%
+\let\svnKeyword@LastChangedBy\svnKeyword@Author@exp%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+% \subsubsection{Dealing with the \texttt{\string$Revision\string$} keyword}
+% \begin{macro}{\svnKeyword@Revision@unexp}
+% \begin{macro}{\svnKeyword@LastChangedRevision@unexp}
+% \begin{macro}{\svnKeyword@Rev@unexp}
+% \begin{macrocode}
+\def\svnKeyword@Revision@unexp#1#2{}%
+\let\svnKeyword@LastChangedRevision@unexp\svnKeyword@Revision@unexp%
+\let\svnKeyword@Rev@unexp\svnKeyword@Revision@unexp%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@Revision@exp}
+% \begin{macro}{\svnKeyword@LastChangedRevision@exp}
+% \begin{macro}{\svnKeyword@Rev@exp}
+% \begin{macrocode}
+\def\svnKeyword@Revision@exp#1#2{%
+ \svn@parse@Revision$#2$%
+}%
+\def\svn@parse@Revision$#1 : ${%
+ \def\svnInfoRevision{#1}%
+ \ifthenelse{\(\equal{\svnInfoMaxRevision}{--maxrevision--}\) %
+ \OR \(#1 > \svnInfoMaxRevision \)}{\def\svnInfoMaxRevision{#1}}{}%
+ \ifthenelse{\(\equal{\svnInfoMinRevision}{--minrevision--}\) %
+ \OR \( #1 < \svnInfoMinRevision \)}{\def\svnInfoMinRevision{#1}}{}%
+}%
+\let\svnKeyword@LastChangedRevision@exp\svnKeyword@Revision@exp%
+\let\svnKeyword@Rev@unexp\svnKeyword@Revision@exp%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+
+% \subsubsection{Dealing with the \texttt{\string$HeadURL\string$} keyword}
+% \begin{macro}{\svnKeyword@HeadURL@unexp}
+% \begin{macrocode}
+\def\svnKeyword@HeadURL@unexp#1#2{}%
+\let\svnKeyword@URL@unexp\svnKeyword@HeadURL@unexp%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\svnKeyword@HeadURL@exp}
+% \begin{macrocode}
+\def\svnKeyword@HeadURL@exp#1#2{%
+ \svn@parse@HeadURL$#2$%
+}%
+\def\svn@parse@HeadURL$#1 : ${%
+ \def\svnInfoHeadURL{#1}%
+}%
+\let\svnKeyword@URL@exp\svnKeyword@HeadURL@exp%
%</package>
% \end{macrocode}
+% \end{macro}
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \centerline{That's the end}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -834,128 +1181,7 @@
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \iffalse
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The following stuff does not show up in the documentation of the package:
-%
-% svninfo2html.tex: the example file for transforming to HTML
-%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-%<*html>
-\documentclass{article}
-\IfFileExists{html.sty}{\usepackage{html}}{}
-\usepackage{svninfo}
-
-\IfFileExists{html.sty}{%
-% the svninfo.perl stuff needs that the .aux file has been read!
-\begin{htmlonly}%
-\input{svninfo2html.aux}%
-\end{htmlonly}%
-}{}
-
-\newcommand{\LatexToHtml}{\LaTeX 2\texttt{HTML}}
-\newcommand{\Var}[1]{\texttt{\$svninfo::#1}}
-\newcommand{\SVN}{\emph{SVN}}
-
-\pagestyle{fancy}
-
-\begin{document}
-\svnInfo $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $
-
-\author{Achim D. Brucker\\
- \small{\texttt{brucker@freiburg.linux.de}}}
-\date{\today}
-\title{Example for converting a \LaTeX\ document to \texttt{HTML}\\
- using \LatexToHtml\ and the \texttt{svninfo}-package}
-\maketitle
-
-\section{Notes}
-%%%%%%%%%%%%%%%
-
-\begin{itemize}
-\item Use at least version \emph{99.1 release (March 30, 1999)} of
- \LatexToHtml.
-
-\item You should \verb|\usepackage{html}|.
-
-\item You must run \LaTeX\ on the input file before running \LatexToHtml.
-
-\item In order to make \LatexToHtml\ read the \verb|.aux| file, you must
- either:
- \begin{itemize}
- \item call \LatexToHtml\ with the option
- \verb|-show_section_numbers| or
- \item include the \verb|.aux| file explicitly in your \LaTeX-source, by
- adding the lines in the preamble:\\
- \verb|\begin{|\verb|htmlonly}|\\ % looks ulgy, but otherwise
- \verb|\input{|\emph{source}\verb|.aux}|\\
- \verb|\end{|\verb|htmlonly}|\\ % latex2html fails.
- which requires \verb|\usepackage{html}|.
- \end{itemize}
- If you don't do so, the \verb|\svnInfo...| commands give no value.
-
-\item If using the \LatexToHtml\ tool, only the last \verb|\svnInfo| takes
- effect, e.g.~if using several input files each having the \verb|\svnInfo|
- command, only the vales of the last included file are used.
- (If this is a serious problem for you, drop me a mail).
-
-\item If the \verb|fancy| / \verb|fancyhdr| option is given to the
- \verb|svninfo| package,
- the date of the \verb|ADDRESS| at the bottom of the \texttt{HTML}
- page is set to the \SVN\ date.
-
-\item If you would like to set your own \verb|ADDRESS| text, you should
- define a procedure, which sets \texttt{perl} \verb|$main::ADDRESS|
- variable in your local \texttt{.latex2html} initialization file.
- The routine may use the \texttt{perl}
- variables shown below. Assign a reference of this procdure to the
- \texttt{perl}-variable
- \verb|$svninfo::SetAddressProc|.
- E.g.\ if you have a \texttt{perl} routine \verb|&my_address_field|,
- then \\
- \verb|$svninfo::SetAddressProc = &my_address_field|.
-
- For example the follownig \texttt{perl}-code does the job:
-\begin{verbatim}
-sub my_address_field
-{
- $ADDRESS = '<hr>This file was last updated on ' .
- $svninfo::Date .
- '&nbsp; by ' .
- '<a href="mailto: brucker@freiburg.linux.de">' .
- 'Achim D. Brucker ' .
- '&lt;brucker@freiburg.linux.de&gt;</a>';
-}
-$svninfo::SetAddressProc = \&my_address_field;
-\end{verbatim}
-\end{itemize}
-
-\newpage
-
-\section{Example}
-%%%%%%%%%%%%%%%%%
-
-\label{sec-examples}
-Here are the commands and their output:
-
-\begin{tabular}{lll}
-\LaTeX-command & \texttt{perl} variable & Result for this file \\\hline
-\verb|\today| & \texttt{\$today} & \today \\
-\verb|\svnInfoFile| & \Var{File} & \svnInfoFile \\
-\verb|\svnInfoRevision| & \Var{Revision} & \svnInfoRevision \\
-\verb|\svnInfoOwner| & \Var{Owner} & \svnInfoOwner \\
-\verb|\svnInfoDate| & \Var{Date} & \svnInfoDate \\
-\verb|\svnInfoLongDate| & \Var{LongDate} & \svnInfoLongDate \\
-\verb|\svnInfoDay| & \Var{Day} & \svnInfoDay \\
-\verb|\svnInfoMonth| & \Var{Month} & \svnInfoMonth \\
-\verb|\svnInfoYear| & \Var{Year} & \svnInfoYear \\
-\end{tabular}
-
-\end{document}
-%</html>
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The following stuff does not show up in the documentation of the package:
@@ -969,7 +1195,7 @@ Here are the commands and their output:
\Msg{}
\Msg{***********************************************************}
\Msg{** Hello to the installation of the `svninfo' package.}
-\Msg{** Version 0.3, September 29, 2005}
+\Msg{** Version 0.6, May 11, 2006}
\Msg{***********************************************************}
\Msg{}
@@ -977,7 +1203,6 @@ Here are the commands and their output:
\askforoverwritefalse
% \file{svninfo.ins}{\from{svninfo.dtx}{header,ins}}
\file{svninfo.sty}{\from{svninfo.dtx}{header,package}}
- \file{svninfo2html.tex}{\from{svninfo.dtx}{header,html}}
\usepreamble\empty
\usepostamble\empty
\file{svninfo.perl}{\from{svninfo.dtx}{perl}}
@@ -991,338 +1216,13 @@ Here are the commands and their output:
\Msg{** To finish the installation move the file `svninfo.sty' and}
\Msg{** svninfo.cfg to a place where LaTeX will find it.}
\Msg{** To Get the documentation: `latex svninfo.dtx'}
-\Msg{** and `latex svninfo2html.dtx'}
-\Msg{** If you are using LaTeX2HTML, move the PERL-package}
-\Msg{** `svninfo.perl' to a place where LaTeX2HTML will find it.}
-\Msg{** `svninfo.perl' is created by running `latex svninfo.dtx'.}
\Msg{** Happy TeXing}
\Msg{***********************************************************}
\Msg{}
%</ins>
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The following stuff does not show up in the documentation of the package:
-% svninfo.perl
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%<*perl>
-###############################################################################
-# SVNINFO.PERL
-# Copyright 1995 Dr. Juergen Vollmer <Juergen.Vollmer@acm.org>
-# Copyright 2003-2005 Achim D. Brucker <brucker@freiburg.linux.de>
-#
-# Extension to LaTeX2HTML to translate LaTeX commands of the
-# svninfo
-# package to equivalent HTML commands.
-#
-# This is file `svninfo.perl',
-# generated with the docstrip utility.
-#
-# The original source files were:
-#
-# svninfo.dtx (with options: `perl')
-#
-# IMPORTANT NOTICE:
-#
-# For the copyright see the source file.
-#
-# Any modified versions of this file must be renamed
-# with new filenames distinct from svninfo.perl.
-#
-# For distribution of the original source see the terms
-# for copying and modification in the file svninfo.dtx.
-#
-# This generated file may be distributed as long as the
-# original source files, as listed above, are part of the
-# same distribution. (The sources need not necessarily be
-# in the same archive or directory.)
-#
-# $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $
-#
-###############################################################################
-
-package svninfo;
-
-($Dummy1,$PackageVersionDate,$PackageVersionTime,$Dummy2) =
- split (/ /,'$Date: 2005-04-08 08:18:47 +0200 (Fr, 08 Apr 2005) $');
-
-print "\n\t svninfo style interface for LaTeX2HTML, $PackageVersionDate\n";
-
-# set defaults options
-$OptionFancy = 1;
-$OptionToday = 1;
-$OptionLong = 1;
-
-# set default values
-$Date = `date '+%Y/%m/%d'`;
-$Time = `date '+%H:%M:%S'`;
-$File = "--sourcefile--";
-$Revision = "--revision--";
-$Owner = "--owner--";
-$Year = `date '+%Y'`;
-$Month = `date '+%m'`;
-$Day = `date '+%d'`;
-$LongDate = $Date;
-
-sub SetAddress
-{
- $main::address_data[1] = "Revision: $svninfo::Revision, $svninfo::LongDate";
- # Supply your own string if you don't like the default <Name> <Date>
- $main::ADDRESS = "<I>$main::address_data[0] <BR>\n$main::address_data[1]</I>";
-}
-if ($SetAddressProc == "") {
- $SetAddressProc = \&svninfo::SetAddress;
-}
-sub make_cmds
-{
- my $cmd;
- foreach $cmd (File,Revision,Date,Time,Owner,Year,Month,Day,LongDate) {
- eval "sub main::do_cmd_svnInfo$cmd { "
- . 'my $val = $svninfo::' . "$cmd; "
-# . 'printf STDERR "\ndo_cmd_svnInfo%s=%s\n", ' . $cmd .', $val;'
- . "join('',\$val,\$_[0]);"
- . "}";
- }
-}
-
-@GermanMonthName = ('','Januar','Februar','M&auml;rz','April','Mai','Juni','Juli',
- 'August','September','Oktober','November','Dezember');
-@EnglishMonthName = ('','January','February','March','April','May','June','July',
- 'August','September','October','November','December');
-@FrenchMonthName = ('','Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin',
- 'Juillet','Ao&ucirc;t','Septembre','Octobre','Novembre',
- 'D&eacute;cembre');
-
-###############################################################################
-
-package main;
-
-# handling package options
-sub do_svninfo_fancyhdr { $svninfo::OptionFancy = 1; }
-sub do_svninfo_fancy { $svninfo::OptionFancy = 1; }
-sub do_svninfo_nofancy { $svninfo::OptionFancy = 0; }
-sub do_svninfo_today { $svninfo::OptionToday = 1; }
-sub do_svninfo_notoday { $svninfo::OptionToday = 0; }
-sub do_svninfo_short { $svninfo::OptionLong = 0; }
-sub do_svninfo_long { $svninfo::OptionLong = 1; }
-
-# handling of LaTeX commands
-sub do_cmd_svnInfo
-{
-
- local ($_) = @_;
-
- # printf STDERR "\ndo_cmd_svnInfo\n";
-
- # see latex2html, procedure: substitute_meta_cmds, process_body_newcommand
- # the format of the variable $new_command{cmd} is:
- # $new_command{$cmd} = join(':!:',$argn,$body,$opt);
- # note: opt = "}" means: Flag for no optional arg
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoFILE};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoREVISION};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoYEAR};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoMONTH};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoDAY};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoTIME};
- # printf STDERR "xxxxxxxxxxx `%s'\n", $new_command{svnInfoOWNER};
-
- # the following assumes: LaTeX2HTML Version 99.1 release (March 30, 1999)
- # may be later
- my ($argn, $opt);
- if (exists $new_command{svnInfoFILE}) {
- ($argn, $svninfo::File, $opt) = split(/:!:/, $new_command{svnInfoFILE});
- } else {
- $svninfo::File = $File
- }
- if (exists $new_command{svnInfoREVISION}) {
- ($argn, $svninfo::Revision, $opt) = split(/:!:/, $new_command{svnInfoREVISION});
- } else {
- $svninfo::Revision = $Revision
- }
- if (exists $new_command{svnInfoYEAR}) {
- ($argn, $svninfo::Year, $opt) = split(/:!:/, $new_command{svnInfoYEAR});
- } else {
- $svninfo::Year = $Year
- }
- if (exists $new_command{svnInfoMONTH}) {
- ($argn, $svninfo::Month, $opt) = split(/:!:/, $new_command{svnInfoMONTH});
- } else {
- $svninfo::Month = $Month
- }
- if (exists $new_command{svnInfoDAY}) {
- ($argn, $svninfo::Day, $opt) = split(/:!:/, $new_command{svnInfoDAY});
- } else {
- $svninfo::Day = $Day
- }
- if (exists $new_command{svnInfoTIME}) {
- ($argn, $svninfo::Time, $opt) = split(/:!:/, $new_command{svnInfoTIME});
- } else {
- $svninfo::Time = $Time
- }
- if (exists $new_command{svnInfoOWNER}) {
- ($argn, $svninfo::Owner, $opt) = split(/:!:/, $new_command{svnInfoOWNER});
- } else {
- $svninfo::Owner = $Owner
- }
-
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::File;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Revision;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Year;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Month;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Day;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Time;
- # printf STDERR "yyyyyyyyyyy `%s'\n", $svninfo::Owner;
-
- # the following code is for oldfashioned latex2hmtl, not anymore supported
- # format of $_:
- # vvvvvv that's text following the SVN-Id-string
- # <#nr#>.....<#nr>......
- # ^ ^ ^ that's the SVN-Id-string
-# my ($Nr,$IdString,$Rest) = /(<#\d+#>)(.*)\1(.*)/s ;
-
- # The Id-String may contain various tags, remove them
-# $IdString =~ s/<[^>]*>//g;
-
- # The Id-String may contain various tags, remove them
-# $IdString =~ s/<[^>]*>//g;
-
- # split the Id-string
-# my ($id,$file,$revision,$date,$time,$owner) = split(/\s/,$IdString);
-
- # remove trailing ,v
-# $file =~ s/,v$//;
-
- # split date
-# ($svninfo::Year,$svninfo::Month,$svninfo::Day) = split (/\//,$date);
-
-# $svninfo::Revision = $revision;
-# $svninfo::File = $file;
-# $svninfo::Date = $date;
-# $svninfo::Time = $time;
-# $svninfo::Owner = $owner;
-
- if ($default_language eq 'german' || $default_language eq 'austrian') {
- $svninfo::LongDate = $svninfo::Day . '.&nbsp;' .
- $svninfo::GermanMonthName[$svninfo::Month] . '&nbsp;' .
- $svninfo::Year;
- $svnInfo::Date = $svninfo::Day . '.&nbsp;' . $svninfo::Month . '.&nbsp;' . $svninfo::Year;
- } elsif ($default_language eq 'french') {
- $svninfo::LongDate = $svninfo::Day . '.&nbsp;' .
- $svninfo::FrenchMonthName[$svninfo::Month] . '&nbsp;' .
- $svninfo::Year;
- $svnInfo::Date = $svninfo::Day . '.&nbsp;' .$svninfo::Month . '.&nbsp;' . $svninfo::Year;
- } else { # english is the default
- $svninfo::LongDate = $svninfo::EnglishMonthName[$svninfo::Month] . '&nbsp;' .
- $svninfo::Day . ',&nbsp;' .
- $svninfo::Year;
- $svnInfo::Date = $svninfo::Year . '/' .$svninfo::Month . '/' . $svninfo::Day;
- }
-
- if ($svninfo::OptionFancy == 1) {
- &$svninfo::SetAddressProc;
- }
- svninfo::make_cmds();
-
- # printf STDERR "xxx $HTML_VERSION, $HTML_OPTIONS\n";
- # remove stuff generated for the $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $-string
- # we assume that noting follows the "\svnInfo $Id....$"
- if ($HTML_VERSION >= 3.2) {
- /^<tex2html_verbatim_mark>[^\n]*/;
- return $';
- } elsif ($HTML_VERSION == 3.1 || $HTML_VERSION == 2.1) {
- /^<tex2html_image_mark>[^\n]*/;
- return $';
- } else {
- if ($HTML_OPTIONS =~ /math/) {
- /^<tex2html_verbatim_mark>[^\n]*/;
- return $';
- } else {
- /^<tex2html_image_mark>[^\n]*/;
- return $';
- }
- }
-}
-
-# Replace do_cmd_today (\today) using the SVN date.
-sub do_cmd_today {
- local($today);
- if ($svninfo::OptionToday == 1) {
- $today = $svninfo::LongDate;
- } else {
- if ($default_language eq 'german' || $default_language eq 'austrian') {
- $today = (`date "+%m:%d, 20%y"`);
- $today =~ s/(\d{1,2}):0?(\d{1,2}),/$2. $svninfo::GermanMonthName[$1]/o;
- $today =~ s/20([7|8|9]\d{1})/19$1/o;
- } elsif ($default_language eq 'french') {
- $today = (`date "+%m:%d, 20%y"`);
- $today =~ s/(\d{1,2}):0?(\d{1,2}),/$2 $svninfo::FrenchMonthName[$1]/o;
- $today =~ s/20([7|8|9]\d{1})/19$1/o;
- } else { # english is the default
- $today = (`date "+%m:%d, 20%y"`);
- $today =~ s/(\d{1,2}):0?/$svninfo::EnglishMonthName[$1] /o;
- $today =~ s/20([7|8|9]\d{1})/19$1/o;
- }
- }
- join('',$today,$_[0]);
-}
-
-1;
-
-###############################################################################
-%</perl>
-%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% The following stuff does not show up in the documentation of the package:
-% latex2html.init
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%<*init>
-# This is file `svninfo.init',
-# generated with the docstrip utility.
-#
-# The original source files were:
-#
-# svninfo.dtx (with options: `init')
-#
-# IMPORTANT NOTICE:
-#
-# For the copyright see the source file.
-#
-# Any modified versions of this file must be renamed
-# with new filenames distinct from svninfo.init.
-#
-# For distribution of the original source see the terms
-# for copying and modification in the file svninfo.dtx.
-#
-# This generated file may be distributed as long as the
-# original source files, as listed above, are part of the
-# same distribution. (The sources need not necessarily be
-# in the same archive or directory.)
-#
-# This file should be used as initialization file for LaTeX2HTML
-# when transforming svninfo2html.tex --> HTML
-#
-# $Id: svninfo.dtx 1168 2005-04-08 06:18:47Z brucker $
-###############################################################################
-sub my_address_field
-{
- $ADDRESS = '<hr>This file was last updated on ' .
- $svninfo::Date .
- '&nbsp; by ' .
- '<a href="mailto: brucker @ freiburg.linux.de@">' .
- 'Achim D. Brucker ' .
- '&lt;brucker @ freiburg.linux.de&gt;</a>';
-}
-$svninfo::SetAddressProc = \&my_address_field;
-###############################################################################
-%</init>
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% E N D of R C S I N F O . D T X
+% E N D of S V N I N F O . D T X
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\fi
diff --git a/Master/texmf-dist/source/latex/svninfo/svninfo.ins b/Master/texmf-dist/source/latex/svninfo/svninfo.ins
index 0d93559e720..066aedc84ca 100644
--- a/Master/texmf-dist/source/latex/svninfo/svninfo.ins
+++ b/Master/texmf-dist/source/latex/svninfo/svninfo.ins
@@ -27,10 +27,9 @@
%%
%% This package is used to extract the revision and file information provided
%% by the Subversion revision control system.
-%% A PERL-package supporting svninfo and LaTeX2HTML is provieded too.
%%
%% Copyright (C) 1995 Dr. Juergen Vollmer
-%% Copyright (C) 2003 Achim D. Brucker
+%% Copyright (C) 2003-2006 Achim D. Brucker
%% License:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
@@ -64,17 +63,15 @@
\Msg{}
\Msg{***********************************************************}
\Msg{** Hello to the installation of the `svninfo' package.}
-\Msg{** Version 0.3, September 29, 2005}
+\Msg{** Version 0.5, Januar 11, 2006}
\Msg{***********************************************************}
\Msg{}
\generate{
\askforoverwritefalse
\file{svninfo.sty}{\from{svninfo.dtx}{header,package}}
- \file{svninfo2html.tex}{\from{svninfo.dtx}{header,html}}
\usepreamble\empty
\usepostamble\empty
- \file{svninfo.perl}{\from{svninfo.dtx}{perl}}
\file{svninfo.init}{\from{svninfo.dtx}{init}}
\file{svninfo.cfg}{\from{svninfo.dtx}{header,config}}
}
@@ -85,10 +82,6 @@
\Msg{** To finish the installation move the file `svninfo.sty' and}
\Msg{** svninfo.cfg to a place where LaTeX will find it.}
\Msg{** To Get the documentation: `latex svninfo.dtx'}
-\Msg{** and `latex svninfo2html.dtx'}
-\Msg{** If you are using LaTeX2HTML, move the PERL-package}
-\Msg{** `svninfo.perl' to a place where LaTeX2HTML will find it.}
-\Msg{** `svninfo.perl' is created by running `latex svninfo.dtx'.}
\Msg{** Happy TeXing}
\Msg{***********************************************************}
\Msg{}