diff options
26 files changed, 2735 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/rcs/CATALOG b/Master/texmf-dist/source/latex/rcs/CATALOG new file mode 100644 index 00000000000..45c99f821c7 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/CATALOG @@ -0,0 +1,19 @@ +Name: rcs +Version: 3.0 [02 Aug 95] +Problems-To: jschrod@acm.org +Author: Joachim Schrod +Address: Rödermark, Germany. + +Description: RCS is a revision control system, used for managing + versions and variants of files. It's possible to include + automatically information from this system in the managed files. + rcs.sty is a LaTeX package that helps to typeset this information + (last check-in date, revision number, etc.) + With the help of a configurable RCS system, one can also typeset + the revision log (aka version history). + +Keywords: LaTeX package, RCS, Revision Control System, Literate + Programming, File documentation + +Note: Some old rcs.sty files exist, by various authors; this package + is upward-compatible to them. diff --git a/Master/texmf-dist/source/latex/rcs/History b/Master/texmf-dist/source/latex/rcs/History new file mode 100644 index 00000000000..37bbfe8b35b --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/History @@ -0,0 +1,45 @@ +rcs-sty/History 02 Feb 03 -*- Indented-Text -*- +--------------------------------------------------------------------------- + +Version 3.1 02 Feb 03 + + Support file names with underscores in RCS field values. + + +Version 3.0 02 Aug 95 + + LaTeX 2e package. + + Distribution conforms to `supported bundles guidelines.' + + +Version 2.1 08 Nov 93 + + The layout of the log list may be configured now. + + +Version 2.0 03 Nov 93 + + Supports typesetting of revision logs. + + Upward compatible to Nelson Beebe's rcs.sty. + (Supports \RCSID.) + + Upward compatible to Tom Verhoeff's rcs.sty. + (Supports \RCSdef.) + + New directory structure, this is a full distribution now. + Description of internal interface is available. + + +Version 1.0 08 Sep 93 + + First full release. + + Upward compatible to Piet van Oostrum's rcs.sty. + + +Version 0.1 08 Nov 91 + + Alpha release, for the print-makeprog package. + (Knows only \RCSdate.) diff --git a/Master/texmf-dist/source/latex/rcs/INSTALL b/Master/texmf-dist/source/latex/rcs/INSTALL new file mode 100644 index 00000000000..686ea4574e9 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/INSTALL @@ -0,0 +1,63 @@ +$Id: INSTALL,v 1.1 1995/08/02 14:55:51 schrod Exp $ +------------------------------------------------------------ + + +You're not on Unix? Jump ahead to `INSTALLATION BY HAND'. + + +INSTALLATION ON UNIX +==================== + +I have supplied a Makefile for your convenience. You have to edit it +to tell make where your TeX installation lives. + +Do you have a TDS-compliant installation? +(E.g., teTeX, highly recommended.) + + yes => Change the value of TEXMF to your TDS root directory. + no => Change even more variables (the ones below TEXMF). + Make sure all parent directories exist. + +Do you use AUC-TeX? + + yes => Assign your AUC-TeX directory to AUCTEX. + no => Doesn't matter, let the current AUCTEX value as it is. + + +Type + make + +Everything should be installed now. + +If you have a TDS installation structure and make complains that the +LaTeX directory is not found, install LaTeX first. + + + +TYPESET REVISION LOGS +--------------------- + +If you want to typeset revision logs, you need a configurable RCS. We +created a version, which is currently in beta test. You'll find it in +ftp.th-darmstadt.de:pub/programming/management/confrcs/. + + + +INSTALLATION BY HAND +==================== + +Copy rcs.sty to some directory where LaTeX finds it. + The correct TDS directory name is tex/latex/misc/, relative to the + TDS root. + +Copy *.dvi from the current directory to the directory +where you keep the documentation for your installed LaTeX styles. + What? You don't have such a directory? Shame on you. ;-) + The TDS proposes one the following directory names: doc/latex/rcs + or doc/latex/styles/rcs/. I use the latter. + +If you use AUC-TeX, copy style/rcs.el to the directory <auctex>/style. +Here <auctex> is either the directory, where AUC-TeX is installed, or +it is the directory where you keep your personal LaTeX style files. +(If that's all Greek to you, refer to the installation instructions of +AUC-TeX.) diff --git a/Master/texmf-dist/source/latex/rcs/MANIFEST b/Master/texmf-dist/source/latex/rcs/MANIFEST new file mode 100644 index 00000000000..a801d5b203f --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/MANIFEST @@ -0,0 +1,20 @@ +$Id: MANIFEST,v 1.1 1995/08/02 14:55:51 schrod Exp $ -*- Indented-Text -*- +---------------------------------------------------------------------- + +The following files are part of the rcs bundle: + + README -- general intro, what's this package for + CATALOG -- catalog information about this bundle + INSTALL -- installation instructions + + rcs.sty -- style file + rcs-user.dvi -- typeset user manual + rcs-conf.dvi -- typeset description of internal interface + rcs.el -- style information for AUC-TeX + + History -- revision history of this package + MANIFEST -- this file + License -- GPL + Makefile -- will help you for installation on Unix + src/ -- subdirectory with my development area + Please read the file README in that directory. diff --git a/Master/texmf-dist/source/latex/rcs/Makefile b/Master/texmf-dist/source/latex/rcs/Makefile new file mode 100644 index 00000000000..c41c4548bb3 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/Makefile @@ -0,0 +1,67 @@ +# $Id: Makefile,v 1.5 1995/08/02 14:55:52 schrod Exp $ +#---------------------------------------------------------------------- + +default:: install + + +# +# installation +# + +# root of TDS compliant installation, AUC-TeX root + + TEXMF = /usr/local/lib/texmf + AUCTEX = /usr/local/lib/xemacs/site-lisp/auctex + +# installation target directories +# (No need to change here for TDS installations.) + + LATEX = $(TEXMF)/tex/latex + RCS = $(LATEX)/misc + + LATEX_DOC = $(TEXMF)/doc/latex + RCS_DOC = styles/rcs + + +# installation actions + +.PHONY: install + +install:: $(LATEX) $(LATEX_DOC) + test -d $(RCS) || mkdir $(RCS) + cp rcs.sty $(RCS) + cd $(LATEX_DOC) ; \ + if [ ! -d $(RCS_DOC) ] ; \ + then d=`echo $(RCS_DOC) | sed 's:/.*::'` ; \ + test -d $$d || mkdir $$d ; \ + test -d $(RCS_DOC) || mkdir $(RCS_DOC) ; \ + fi + cp *.dvi $(LATEX_DOC)/$(RCS_DOC) + @if [ -d $(AUCTEX) ] ; \ + then set -x ; cp rcs.el $(AUCTEX)/style ; \ + else echo "No AUC-TeX dir, skipping installation of rcs.el." >&2 ; \ + fi + +$(LATEX): + @echo "You don't have a LaTeX styles directory (tree)." >&2 + @exit 1 + +$(LATEX_DOC): + @echo "You don't have a LaTeX documentation directory (tree)." >&2 + @exit 1 + + + +# +# management tasks +# + +.PHONY: export + +export:: + cd src ; imkmf ; make export + cp $(HOME)/Notes/Copying.gpl License + pwd=`pwd` ; pwd=`suffix $$pwd /` ; cd .. ; \ + gtar -czvf $$pwd.tar.gz \ + --exclude=CVS --exclude=.cvsignore --exclude=.rcsrc $$pwd ; \ + cp $$pwd/README $$pwd.README diff --git a/Master/texmf-dist/source/latex/rcs/rcs.el b/Master/texmf-dist/source/latex/rcs/rcs.el new file mode 100644 index 00000000000..3f090a4f450 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/rcs.el @@ -0,0 +1,65 @@ +;;; $Id: rcs.el,v 1.6 1995/08/02 10:59:53 schrod Exp $ +;;;---------------------------------------------------------------------- + +;;; +;;; AUC-TeX style hook for rcs style option +;;; +;;; (history at end) + + +(TeX-add-style-hook "rcs" + (function + (lambda () + (LaTeX-add-environments "rcslog") + (TeX-add-symbols + ;; public interface + "RCS" ; define \RCS... tag + "RCSTime" ; holds time of Date field + "RCSdate" ; typeset date + "RCSID" ; put RCS field in footline + "RCSdef" ; like \RCS, & output on console + "settime" ; local in env rcslog: set rev time + "rcsAuthor" ; maps uid to full name + "rcsLogIntro" ; intro text to rev log + ;; protected interface + "RcsEmptyValue" ; used as value for unexpanded fields + "RcsHandleDate" ; handler for Date field + "RcsLogStyle" ; define style of RCS log + "RcsLogListStyle" ; define style of log list + "RcsLogHeading" ; heading of RCS log + "RcsLogDate" ; how the date is typeset + "RcsLogTime" ; how the time is typeset + ;; internationalization + "RcsLogHeadingName" ; text in heading of RCS log + "RcsUnknownFile" ; used if Log value is empty + "RcsEmptyLog" ; used as empty Log text + "RcsLogRevision" ; `real name' of \Revision + ;; protected observers -- must not be redefined + "RCS_keyword" ; keyword of last parsed field + "RCS_value" ; value of last parsed field + "RCS_get_author" ; get the full name of an author + ) + ))) + + +;;;====================================================================== +;; +;; $Log: rcs.el,v $ +;; Revision 1.6 1995/08/02 10:59:53 schrod +;; \RcsLoadHook & \RcsLoaded don't exist any more. +;; +;; Revision 1.5 1993/11/08 20:17:18 schrod +;; New tag in protected interface: \RcsLogListStyle +;; +;; Revision 1.4 1993/11/02 21:10:22 schrod +;; New tag in public interface: \RCSdef +;; +;; Revision 1.3 1993/11/02 18:45:43 schrod +;; New tag in public interface: \RCSID +;; +;; Revision 1.2 1993/11/02 16:15:08 schrod +;; Adapted to interface of StyleRevision 2.3. +;; +;; Revision 1.1 1993/10/29 18:14:47 schrod +;; Preliminary version, doesn't care about macro args. +;; diff --git a/Master/texmf-dist/source/latex/rcs/src/Diff b/Master/texmf-dist/source/latex/rcs/src/Diff new file mode 100644 index 00000000000..5df79a2f82e --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/Diff @@ -0,0 +1,13 @@ +*** rcs.doc Sun Feb 2 21:37:37 2003 +--- rcs-new.doc Sun Feb 2 21:38:40 2003 +*************** +*** 542,545 **** + \beginprog +! \def\RcsLogHeadingName{Revision Log for \tt} % file name in monospace +! \def\RcsUnknownFile{\rm $\langle\,$Unknown file name$\,\rangle$} + \def\RcsEmptyLog{{\itshape No log entries available.}} +--- 542,545 ---- + \beginprog +! \def\RcsLogHeadingName{Revision Log for \ttseries} % file name in monospace +! \def\RcsUnknownFile{\rmseries $\langle\,$Unknown file name$\,\rangle$} + \def\RcsEmptyLog{{\itshape No log entries available.}} diff --git a/Master/texmf-dist/source/latex/rcs/src/Imakefile b/Master/texmf-dist/source/latex/rcs/src/Imakefile new file mode 100644 index 00000000000..e24a0d32a02 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/Imakefile @@ -0,0 +1,74 @@ +XCOMM $Id: Imakefile,v 2.3 2003/02/02 22:47:41 schrod Exp $ +/* ---------------------------------------------------------------------- */ + +/* + * Imakefile for rcs package + * + * (history at end) + */ + + +/* needed modules */ +#include <TeX.imk> +#include <makeprog.imk> + +#include <install/TeX.imk> + +XCOMM ------------------------------------------------------------ +XCOMM continue in Imakefile + + +/* exported files */ + +MpDoc2TeXTarget(rcs,sty) + +TeXTarget(latex,rcs-user) +TeXTarget(latex,rcs-conf) + + +/* installation */ + +#ifdef ITI_Site + DESTDIR = /archives/tex/Install +#endif + +InstallTeXLaTeX(misc,rcs.sty) +InstallTeXDoc(latex/styles/rcs,rcs-user.dvi) +InstallTeXDoc(latex/styles/rcs,rcs-conf.dvi) + + +/* internal documentation */ + +TeXFileTarget(latex,rcs,doc) + + +/* export */ + +export:: all rcs.dvi + mv rcs-*.dvi rcs.sty .. + cp style/rcs.el .. + $(MAKE) realclean + +realclean:: clean + $(RM) Makefile + + + +/* ============================================================ + * + * $Log: Imakefile,v $ + * Revision 2.3 2003/02/02 22:47:41 schrod + * Release 3.1. + * + * Revision 2.2 1995/08/02 14:23:49 schrod + * Add rules & files for distribution. + * + * Revision 2.1 1995/08/02 11:54:34 schrod + * Substituted Makefile by Imakefile. + * + + * ------------------------------------------------------------ + * Local Variables: + * mode: Indented-Text + * End: + */ diff --git a/Master/texmf-dist/source/latex/rcs/src/README b/Master/texmf-dist/source/latex/rcs/src/README new file mode 100644 index 00000000000..81f455eafc8 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/README @@ -0,0 +1,29 @@ +$Id: README,v 2.1 1995/08/02 14:23:50 schrod Exp $ -*- Indented-Text -*- +---------------------------------------------------------------------- + +Please note: This directory is part of the distribution primarily for your +information. It's not prepared to be usable by you, sorry. + +In particular, probably you won't have tools and style files I take +for granted during development. Please don't complain, either use the +supplied installable files (as listed in ../MANIFEST) or search & get +the missing files. I will neither stop adding this directory to the +distribution, nor will I add all missing files. + +On the one hand I won't restrict my own development environment by not +using available tools, on the other hand I'll want to make my source +available for those who have a similar environment to mine. + + +For your orientation: + + *.doc -- master file for TeX macro files + *.dvi -- typeset version of *.doc + *-user.tex -- user manual + *-conf.tex -- internal interface description + *.sty -- needed to process the above documents + + TODO -- (sometimes) personal notes for future revisions + Imakefile -- does not use MIT's Imake templates + style/ -- files for AUC-TeX + test/ -- test cases diff --git a/Master/texmf-dist/source/latex/rcs/src/TODO b/Master/texmf-dist/source/latex/rcs/src/TODO new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/TODO diff --git a/Master/texmf-dist/source/latex/rcs/src/rcs-conf.tex b/Master/texmf-dist/source/latex/rcs/src/rcs-conf.tex new file mode 100644 index 00000000000..a743678574a --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/rcs-conf.tex @@ -0,0 +1,209 @@ +% $DocId: rcs-conf.tex,v 2.6 1995/08/02 12:08:41 schrod Exp $ +%------------------------------------------------------------ + +% +% internal interface of the rcs package +% +% [LaTeX] +% (history at end) + + +% This file is either a subdocument of the style or a document on +% its own. In the former case it's a chapter, in the latter it's a +% ``normal'' LaTeX progltx document. +% If it's a subdocument, this file will be included after +% \begin{document}. We can detect this: \document redefines +% \documentclass to be \@twoclasseserror. Then we also have to define +% how this document is ended: Either by \endinput or by an additional +% revision log. +% Of course, this test works only if LaTeX 2e is used for processing. + +\expandafter\ifx \csname @twoclasseserror\endcsname \documentclass + + \let\endSubDocument=\endinput + + \chap The internal interface. + +\else + + \let\endSubDocument=\relax + + \documentclass{progltx} + + \usepackage{rcs-doc} % additional document-specific markup + \usepackage{a4-9} % Tschichold's A4 layout + + \nofiles + + \begin{document} + + \title{The \texttt{rcs} Package\\ + {\large (Internal Interface)}% + } + \author{Joachim Schrod% + \thanks{Email: \texttt{jschrod@acm.org}}% + } + + \RCS $DocDate: 1995/08/02 12:08:41 $ + \date{% + \RCSDocDate\\[3pt] % LaTeX Error: Paragraph terminated too early + (Revision \RCSStyleRevision{} of \texttt{rcs.sty})% + } + + \maketitle + + \sect + +\fi + + +You can configure the |rcs| package by redefining control +sequences (cseqs for short). The cseqs which may be redefined form the +\textsl{protected interface}, all of them start with `|Rcs|'. Some cseqs +may be used by you to get information about the state of this module. +These form the \textsl{observer interface}, all cseqs herein start with +`|RCS_|'. Both cseq sets together form the internal interface. + +You must not redefine a cseq starting with `|rcs|' or `|RCS|'. In no +case redefine a cseq containing an at~sign or an underscore---all of +them belong to the implementation. Here you have a description of an +internal interface you can rely on, use it (and only it) for +configuration. + + +\sect \textsl{The protected interface}. + +\medskip + +\noindent The cseqs of the protected interface fall in two +categories: Configuration of RCS fields and of revision logs. + +In general, handlers for RCS fields may be defined, they have the +name |\RcsHandle|\textit{Keyword}. These sequences are responsible for +the filtering of the value of the RCS \textit{Keyword} field. The +unfiltered value itself is provided in the cseq +|\RCSRaw|\textit{Keyword} or in |\RCS_value| (see below). + +\smallskip + +\noindent The following cseqs my be redefined to configure the |rcs| +package: +% +\begin{quote} +\begin{tabular}{ll} +|\RcsEmptyValue| & used as value for an empty field\\ +|\RcsHandleDate| & handler for the \Date{} field\\[1ex] +% +|\RcsLogStyle| & determines general layout of revision log\\ + & must define |\RcsLogHeading|\\ +|\RcsLogListStyle| & determines layout of revision log list\\ +\itshape |\RcsLogHeading{|text\/|}| & heading of revision log\\ +\itshape |\RcsLogDate| date\/|\endDate| + & typesets date in revision entry intro;\\ + & \textit{date} has the form \textit{yyyy/mm/dd}\\ +\itshape |\RcsLogTime{|time\/|}| + & typesets time in revision entry intro\\ +\end{tabular} +\end{quote} + + +\sect The cseq |\RcsLogListStyle| needs further explanation: The +|rcslog| environment is, in fact, a list environment. +|\RcsLogListStyle| will be used as the second argument of |\list|, it +must define |\makelabel| and setup all list layout parameters. + +Even though |rcslog| is implemented via |list|, I don't regard it as +such. For example, I think it should not increase the list level: an +item list in a revision entries should use the first-level item +labels. This is realized by placing the |rcslog| environment on list +level~0. It follows that |\endlist| must not be used for |\endrcslog|, +|\endtrivlist| is used instead. If you redefine |\RcsLogListStyle| in +such a way that this special list level setting is not done any more, +you \emph{must} redefine |\endrcslog| as well. You were warned. + +Of course, if you just want to change some paragraph layout values, +it's better to append your definitions to the end of +|\RcsLogListStyle|. + + +\sect The following macros must be looked at for internationalization: +% +\begin{quote} +\begin{tabular}{ll} +|\RcsLogHeadingName| & log heading text, in front of filename\\ +|\RcsUnknownFile| & used for unknown filename\\ +|\RcsEmptyLog| & no revision entries are available\\ +\itshape |\RcsLogRevision{|rev\/|}{|date\/|}{|time\/|}{|uid\/|}|% + \hidewidth\null \\ + & introduces a revision entry, must be an |\item|\\ +\end{tabular} +\end{quote} + + + +\sect \textsl{The observer interface}. + +\medskip + +\noindent The following cseqs provide you with information you might +utilize in your configuration. +% +\begin{quote} +\begin{tabular}{ll} +|\rcs@loaded| & the module's RCS revision field\\ + & (This name does not follow the name conventions\\ + & for internal reasons.)\\[1ex] +|\RCS_keyword| & keyword of the last parsed RCS field\\ +|\RCS_value| & value of the last parsed RCS field\\ +\itshape |\RCS_get_author{|uid\/|}| & gets \textit{uid}'s author name\\ +\end{tabular} +\end{quote} + + + +\endSubDocument + + +\vskip \PltxPreSectSkip + +\begin{rcslog} +$DocLog: rcs-conf.tex,v $ +\Revision 2.6 1995/08/02 12:08:41 schrod +Transformed this style option into a \LaTeXe{} package. + +\Revision 2.5 1995/08/01 22:54:09 schrod +Updated to \LaTeXe{}; |\RcsLoadHook| is not necessary any more as that +functionality is provided by \LaTeX{} now. + +Spell checked. + +\Revision 2.4 1993/11/08 20:15:12 schrod +Added possibility to configure the layout of the log list +(|\RcsLogListStyle|). + +Now the log list is on level~0. Thereby item lists or enumerations in +revision entries get first-level labels. This has consequences for +the configuration, this implementation strategy must therefore be +specified in the internal interface description. + +\Revision 2.3 1993/11/03 20:04:05 schrod +Cleaned up for distribution: Added email address to each document, +added copyright info to |rcs.doc|, added acknowledgments. Checked my +English and the spacing. + +\Revision 2.2 1993/11/02 18:43:03 schrod +|\RcsLoaded| must not be redefined, belongs therefore to the observer +interface. I don't write it as |\RCS_loaded| though---it must be +usable outside of style files. + +Don't need auxiliary files. + +\Revision 2.1 1993/11/01 19:49:21 schrod + Added sub-document that describes the internal interface. + +\end{rcslog} + + +\end{document} + +% LocalWords: rcs yyyy mm dd rcslog rev uid diff --git a/Master/texmf-dist/source/latex/rcs/src/rcs-doc.sty b/Master/texmf-dist/source/latex/rcs/src/rcs-doc.sty new file mode 100644 index 00000000000..38d4908eec4 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/rcs-doc.sty @@ -0,0 +1,135 @@ +% $Id: rcs-doc.sty,v 1.4 1995/08/02 12:09:06 schrod Exp $ +%---------------------------------------------------------------------- + +% +% tags for the documentation of rcs style option +% + + +\ProvidesPackage{rcs-doc} + + +% +% Configuration of RCS fields +% + +% keywords in style are prefixed by `Style', in documentation by `Doc'. +\let\RcsHandleStyleDate=\RcsHandleDate % transform StyleDate value +\let\RcsHandleDocDate=\RcsHandleDate % transform DocDate field + +% the revision of rcs.sty is needed by the documentation +\expandafter\RCS \rcs@loaded % creates \RCSStyleRevision + +% name of the author +% +% CAVEAT: Don't define another author name without changing the text +% in the user manual where \rcsAuthor is explained! +\rcsAuthor{schrod}{Joachim Schrod} + + +% +% new tags +% + +\def\rcsField#1{\textsf{#1}} % name of a RCS field (ie, RCS keyword) +\def\Log{\rcsField{Log}} % The `Log' keyword, needed often +\def\Date{\rcsField{Date}} % The `Date' keyword, needed often + + +% +% \macroCall[p]{\\split \[Revision\(: \)1.1\( \]:\) \{\} \\end_value} +% +% \[...\] is param of caller, \(...\) is arg (delimiter) for \split +% empty arg delimiter must be input as `\(\|\)' +% may not be nested, as shown above +% in \macroCall arg: `_' and ` ' are other characters +% \\, \{, and \} produce characters `\', `{' and `}' +% \| is invisible text +% The optional arg is the character to mark the delimiter. By using +% [p] one can mark args with `\(...\)'! + +\newtoks\@macroCall + +\def\macroCall{% + \@ifnextchar[% % ] (Emacs) + \macro@call + {\macro@call[d]}% + } +\def\macro@call[#1]{% + \def\delimChar{#1}% + \begingroup + \catcode`\ =\CatOther + \catcode`\_=\CatOther + \afterassignment\showExample + \global\@macroCall + } + +\newcount\delimCount +\def\showExample{% + \endgroup + \leavevmode + \vtop{% + \reset@font \ttfamily + \let\[\relax \let\]\relax + \let\(\relax \let\)\relax + \chardef\\=`\\ \chardef\{=`\{ \chardef\}=`\} + \def\|{\hskip 1sp}% % must be >0pt, but invisible + \baselineskip\z@skip + \lineskip 2pt + \delimCount\z@ + \hbox{\expandafter\showParam \the\@macroCall \endValue}% + \hbox{\the\@macroCall}% % the example itself + \hbox{\expandafter\showDelimiter \the\@macroCall \(\)\endValue}% + \hrule height \z@ + }% + } + + +\def\showParam #1\[#2\]#3\endValue{% + \hphantom{#1}% + \setbox\z@ \hbox{#2}% + \vbox{\hsize \wd\z@ + \centerline{\tt \#1}% + \vskip 3pt + \hrule + \@@line{\hss \vrule height 3pt \hskip\hsize \vrule \hss}% + }% + \setbox\z@ \hbox{#3}% + \vbox{\hsize \wd\z@ + \centerline{$s$}% + \vskip 3pt + \@@line{\cleaders \hbox{$\mkern 1mu.\mkern 1mu$}\hfill}\nointerlineskip + \@@line{\hskip\hsize \vrule height 3pt \hss}% + }% + } + +\def\showDelimiter #1\(#2\)#3\endValue{% + \hphantom{#1}% + \advance\delimCount \@ne + \setbox\z@ \hbox{#2}% + \ifdim \wd\z@=\z@ + \else + \vtop{\hsize\wd\z@ + \@@line{\hss \vrule depth 3pt \hskip\hsize \vrule \hss}% + \hrule + \vskip 3pt + \centerline{$\delimChar_{\the\delimCount}$}% + }% + \showDelimiter #3\endValue + \fi + } + + + +\endinput + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Local Variables: +mode: plain-TeX +TeX-master: t +TeX-brace-indent-level: 4 +indent-tabs-mode: t +TeX-auto-untabify: nil +End: diff --git a/Master/texmf-dist/source/latex/rcs/src/rcs-user.tex b/Master/texmf-dist/source/latex/rcs/src/rcs-user.tex new file mode 100644 index 00000000000..025df2e7dfb --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/rcs-user.tex @@ -0,0 +1,416 @@ +% $DocId: rcs-user.tex,v 1.9 1995/08/02 12:08:41 schrod Exp $ +%------------------------------------------------------------ + +% +% user manual/requirement definition for rcs package +% +% [LaTeX] +% (history somewhere inmidst, search for RCS DocLog field) + + +% This file is either a subdocument of the package or a document on +% its own. In the former case it's a chapter, in the latter it's a +% ``normal'' LaTeX progltx document. +% If it's a subdocument, this file will be included after +% \begin{document}. We can detect this: \document redefines +% \documentclass to be \@twoclasseserror. Then we also have to define +% how this document is ended: Either by \endinput or by \end{document}. +% Of course, this test works only if LaTeX 2e is used for processing. + +\expandafter\ifx \csname @twoclasseserror\endcsname \documentclass + + \let\endDocument\endinput + + \chap What's this package for?. + +\else + + \def\endDocument{\end{document}} + + \documentclass{progltx} + + \usepackage{rcs-doc} % addition document-specific markup + \usepackage{a4-9} % Tschichold's A4 layout + + \nofiles + + \begin{document} + + \title{The \texttt{rcs} Package} + \author{Joachim Schrod% + \thanks{Email: \texttt{jschrod@acm.org}}% + } + + \RCS $DocDate: 1995/08/02 12:08:41 $ + \date{% + \RCSDocDate\\[3pt] % LaTeX Error: Paragraph terminated too early + (Revision \RCSStyleRevision{} of \texttt{rcs.sty})% + } + + \maketitle + + \sect + +\fi + + +An important problem in program development and maintenance is version +control, i.e., the task of keeping a software system consisting of +many versions and configurations well organized. The \textsl{Revision +Control System} (RCS) is a software tool that assists with that +task. RCS manages revisions of text documents, in particular source +programs, documentation, and test data. It automates storing, +retrieval, logging and identification of revisions, and it provides +selection mechanisms for composing configurations. In addition, it is +able to insert management information in the text document, in +so-called \textsl{RCS fields}. + +The \textsl{Concurrent Versions System} (CVS) is a front end to RCS +which extends the notion of revision control from a collection of +files in a single directory to a hierarchical collection of +directories consisting of revision-controlled files. These +directories and files can be combined to form a software +release. CVS provides the functions necessary to manage these +software releases and to control the concurrent editing of source +files among multiple software developers. + + +\sect If you put \LaTeX{} documents under RCS control, you'll often want to +have access to the data of the RCS fields within your document, e.g., +to put the date of the last checkin, the revision number, or the +author's name in your document. This package provides \TeX{} +tags that give you access to this information. In addition, using a +configurable RCS, you can typeset your revision logs. + + +\sect There is one restriction: If you checked out with the |-kv| +option, you cannot \LaTeX{} your document any more. You'll get an +error then. If you're a CVS user, the same holds for the `|cvs export|' +command. (Actually, this is equivalent to `|co -kv|'.) This +would discard the dollars and all keywords from the RCS fields; the +tags explained below need the keywords to work properly. + +If you have any idea how a tag might look which circumvents this +problem, contact me. (I'm not asking for an implementation, I'm asking for an +idea for a user interface!) E.g., are you hit by this problem, and are +you willing to enter an additional argument with the keyword for each +RCS field? + +\medskip + +This package assumes the file naming possibilities of Unix. It does not +work without changes on systems with a restricted file name syntax, +like MS-DOS, VMS, etc. In particular, it assumes that RCS uses~`|,v|' +as the suffix for its files, as it's the default. + + +\sect Let's first consider the access to the values of RCS +fields. By writing +% +\begin{quote} + |\RCS $|\textit{Keyword}|$| +\end{quote} +% +in your document, a tag +% +\begin{quote} + |\RCS|\textit{Keyword} +\end{quote} +% +is created which expands to the value of the field with this +respective keyword. E.g., if you write |\RCS $Revision: 1.10 $| and you +check in your document, RCS will transform this to something like +|\RCS $Revision: 1.10 $| and you can access the revision of your +document as |\RCSRevision|. This will expand to~`1.1' (note that the +trailing space was discarded). + +Of course, an RCS field has a value only if you have checked in your +file at least once after you inserted it. If the field is brand new, +the constructed \TeX{} tag expands to nothing.% + \footnote{Well, not quite exactly---this can be changed. Refer to + the documentation of the style's internal (programmer's) interface.} + + +\sect The \Date{} field is handled in a slightly different manner: Here +|\RCSDate| doesn't expand to the original RCS value, it's transformed +first. The expansion is the checkin date in a |\today|-like format. +The checkin time is available via |\RCSTime| then. + +If the \Date{} value is empty, |\RCSDate| will expand to the +current date and |\RCSTime| will expand to nothing. + +The ``original'' \Date{} value is stored in |\RCSRawDate|. This whole +transformation is done only if the tag |\today| is defined (which is +the case for all standard classes). + + + +\sect \textsl{Tags for your convenience}. + +\medskip + +\noindent |\RCS| puts information from RCS fields into \TeX{} tags. +Some usages of such values are wanted more often than others: placing +the checkin date on the title page, and placing the field keyword and +value in a footline. This was made available in other |rcs| style options; +we use the tag names from there for the sake of compatibility. + + +\sect The tag |\RCSdate| (with a lowercase~`d') is a convenient +way to put the last checkin date on the title page. It's used instead +of |\date| and expects an RCS \Date{} field afterwards; i.e., to be +input as +% +\begin{quote} + |\RCSdate $Date: 2003/02/02 22:30:22 $| +\end{quote} +% +Afterwards |\maketitle| will use the checkin date. + +In fact, the \Date{} value is still placed in |\RCSDate| (with an +uppercase~`D') and this tag is used as the argument for |\date|. +I.e., this is identical to writing +% +\begin{quote} + |\RCS $Date: 2003/02/02 22:30:22 $|\\ + |\date{\RCSDate}| +\end{quote} + + +\sect The tag |\RCSID| places the keyword and the value of the RCS +field in a box into the footline. The RCS field is expected after the +tag. The value is not transformed---you'll see it exactly as RCS +inserted it. Aside from this, |\RCSID| has the same effect as |\RCS|: +The field value is stored in |\RCS|\textit{Keyword}. + +\textbf{Note:}\quad If you use this tag, you cannot use any other page +style or package that sets the footline! The RCS field value must not +be a file name with underscores, you get \TeX{} errors otherwise. + + +\sect The tag |\RCSdef| is like |\RCS|, but it additionally outputs +the RCS field to the terminal. (As with everything output to the +terminal, it will be in the |LOG| file, too.) The RCS field value must +not be a file name with underscores, you get \TeX{} errors otherwise. + + + +\sect \textsl{Typesetting revision logs}. + +\medskip + +\noindent RCS creates a revision log (sometimes also called change +log, version history, etc.)\ in the lines below a \Log{} field. When +one's \LaTeX{} document is really a program (e.g., if one uses a +system of the WEB family like \texttt{CWEB} or noweb, or if one +uses a documentation system \`a la MAKEPROG), one might want to +incorporate such a log in the typeset document. This is strongly +encouraged for every literate program---the version history is an +integral part of a program's documentation. + +This package provides an environment |rcslog| which supports the +typesetting of logs. But you cannot use it with a normal RCS version. +You need to be able to configure the format of a revision entry. We +have created such a configurable version, you can retrieve it by +anonymous ftp from +\path|ftp.tu-darmstadt.de:pub/programming/management/confrcs|. (We +welcome comments and bug reports.) + +Since version 1.10, CVS has its own internal RCS implementation, +therefore you cannot typeset revision logs with CVS, sorry. Please +contact me if you find a way nevertheless. + + +\sect You must create an RCS configuration file |.rcsrc| where a +backslash is prepended to the revision entries. I.e., it must contain +the following configuration line: + % +\begin{quote} + |log_entry "\\Revision %r %d %t %a\n%l\n"| +\end{quote} + % +This line changes the format of revision entries for \emph{every} +file in your directory. If you want to have this special entry format +only for specific files, you can put a guard in front of this +configuration: the filename and a colon. You can also use wildcards +in the filename. For example, to change the entry format for all +files with the suffix |doc| use + % +\begin{quote} + |*.doc: log_entry "\\Revision %r %d %t %a\n%l\n"| +\end{quote} + % +The configurable RCS gives you more possibilities, refer to its +documentation. + + +\sect The |rcslog| environment needs the \Log{} field as the first +line, there must be no material either before or behind it. If you +just create a new document, you simply input the three lines + % +\begin{quote} + \begin{verbatim} +\begin{rcslog} +$Log: rcs-user.tex,v $ +Revision 1.10 2003/02/02 22:30:22 schrod +Removed dependeny on \LaTeX2.09 font selection commands. (Though +they're still used in the package documentation, as convenience.) + +\end{rcslog} + \end{verbatim} +\end{quote} + % +(Note that the configurable RCS will now set the comment leader to the +empty string, which is exactly the value we need.) + +If you have checked in your document already once and if you don't +have a revision log by now, you still insert the three lines listed +above. Then you have to set the comment leader to the empty string. +If you don't have a WIMP interface to RCS, you do this with the +command `|rcs -c |\textit{filename}'. +%With CVS, you use the command +%`|cvs admin -c |\textit{filename}'. + +If you have checked in your document already and if you already have a +revision log, you insert the environment start +(|\begin{rcslog}|) in a new line before the \Log{} field and +|\end{rcslog}| below the entries. Usually all lines from the revision +log will be prefixed with a comment, delete this prefix from each +line. Each revision entry starts with `|Revision|', change this to +`|\Revision|'. Check that your log texts are valid \LaTeX{} input. +Set the comment leader to the empty string (this is described in the +previous paragraph). Voil\`a, you're finished---welcome to the +community of Literate Programmers! + + +\sect And since the description of this functionality might have been +a bit dry, I want to show you the output you get usually: I insert +here the log of this user manual. In fact, it was created by the +method described in the previous paragraph---the capability of +typesetting revision logs was not available from the very start. + +\begin{rcslog} +$DocLog: rcs-user.tex,v $ +\Revision 1.9 1995/08/02 12:08:41 schrod +Transformed this style option into a \LaTeXe{} package. + +\Revision 1.8 1995/08/01 21:02:14 schrod +Adapted to \LaTeXe{}. Spell checked. + +\Revision 1.7 1993/11/10 12:26:56 schrod +barbara proofread the user manual. Besides her minor changes she +asked what RCS and CVS are, and if this can be used somewhere else +than on Unix. I added appropriate paragraphs to explain the tools. +Actually, the package may be used only on Unix, due to the dependency +on the `|,v|' filename suffix. + +\Revision 1.6 1993/11/03 20:04:23 schrod +Cleaned up for distribution: Added email address to each document, +added copyright info to |rcs.doc|, added acknowledgments. Checked my +English and the spacing. + +Explained the restriction concerning the |-kv| option of |co|. + +\Revision 1.5 1993/11/02 20:02:29 schrod +Introduced new tag |\RCSdef|. This is done to be upward compatible with +Tom Verhoeff's |rcs| style option. + +\Revision 1.4 1993/11/02 18:43:19 schrod +Introduced new tag |\RCSID|. This is done to be upward compatible with +Nelson's |rcs| style option. + +\Revision 1.3 1993/11/01 19:54:08 schrod +Added a description of the internal interface, I can refer now to +that description. (Previously, I refered to the style's documentation.) + +Don't create auxiliary files, we don't need them. + +\Revision 1.2 1993/11/01 19:21:22 schrod +Explained the new feature of typesetting logs. This includes the user +manual's log as an example. + +Improved the documentation. Told first what happens, then the +exceptions. Used ``pseudo section headings'' to give visual clues for +the structure. + +Added the style's revision number to the title page.\\ + Used |rcs-doc.sty| for documentation of |rcs| style. It not only +loads style options, but it also defines |\RCSStyleRevision| for +access of the style's revision. + +Prefixed keywords of RCS fields with `|Doc|'. This way we can use the +normal keywords in examples and don't have to care about +non-expansion. + +\Revision 1.1 1993/09/03 21:01:28 schrod +Re-implemented |rcs| style option. Made it a documented option. + +\end{rcslog} + + +\sect Nearly every detail of the formatting of the log is done by +macros that can be changed, refer to the documentation of the style's +internal interface for more information. + +In particular, the |rcslog| environment accepts an optional argument, +the configuration. Here \LaTeX{} code is expected, which is inserted +after the initial setup, before the heading is set. E.g., this is the +place for you to change the type size. (Although this should be done +with care---you'll also have to change the heading to get a consistent +layout.) + +In addition, the tag |\settime| may be used in this optional argument +to add the checkin time to all revision entries. (Longtime RCS users +will have noticed already that it was omitted.) This tag---as well +as |\Revision|---is not defined outside the environment. + + +\sect Longtime RCS users will have noticed another fine point in the +log presented above: My full name was presented, not my user id +(actually, `|schrod|'). This was done by placing the tag + % +\begin{quote} + |\rcsAuthor{schrod}{Joachim Schrod}| +\end{quote} + % +somewhere before the log. Of course, if no full name has been +presented for a user id, the user id itself is used as the author's +name. + + +\sect As explained above, one can configure the layout with an +optional argument of the environment. (Or by redefining macros from +the style writer's interface in another style option.) What's wanted +sometimes are some introductionary words to the log; this can't be +done easily this way. (Remember, the heading is not typeset yet.) +Therefore, we provide a tag for this obvious need. + +The introductionary text can be specified as the parameter of the tag +|\rcsLogIntro|. It will be inserted after the heading, before the +\Log{} list. + + + +\sect \textsl{Compatibility issues}. + +\medskip + +\noindent This package is user interface compatible to \textsc{Piet van +Oostrum}'s |rcs| style option. The internal interface of Piet's style +option is not supported; check the documentation of this package's +internal interface for its own internal configuration possibilities. + +This package is user interface compatible to \textsc{Nelson Beebe}'s |rcs| +style option. But it does not set the footline unconditionally. + +This package is user interface compatible to \textsc{Tom Verhoeff}'s |rcs| +style option. (Well, the text output by |\RCSdef| is not identical.) + +And, of course, it's upward compatible to previous revisions\,\dots + + + +\endDocument + +% LocalWords: checkin kv cvs co rcslog confrcs rcsrc doc rcs admin Voil Piet +% LocalWords: proofread Verhoeff's Nelson's Oostrum Piet's Verhoeff diff --git a/Master/texmf-dist/source/latex/rcs/src/rcs.doc b/Master/texmf-dist/source/latex/rcs/src/rcs.doc new file mode 100644 index 00000000000..9712d9c256a --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/rcs.doc @@ -0,0 +1,1006 @@ +% $StyleId: rcs.doc,v 2.10 2003/02/02 20:42:38 schrod Exp $ +%---------------------------------------------------------------------- +% Written by Joachim Schrod <jschrod@acm.org>. +% Copyright conditions see below. + +% +% LaTeX package rcs +% to use RCS tag values in one's document, and typeset revision logs +% +% [LaTeX in MAKEPROG] +% (history at end) + +% If you have received this style file without the user manual (in the +% file rcs-user.tex or the respective DVI file), it's incomplete and +% near to useless. If it was given to you as something that you shall +% use as an author -- complain bitterly to your provider. You need the +% documentation and you have a right on it! (Below you can find info +% where to get the reference version.) + + + +\documentclass{progltx} + +\usepackage{rcs-doc} +\usepackage{path} +\usepackage{alltt} +\usepackage{fullpage} + + +\RCS $StyleDate: 2003/02/02 20:42:38 $ + + +\begin{document} + + +\title{The \texttt{rcs} Package\\ + {\large (Implementation)}% + } +\author{% % LaTeX does not discard unnecessary glue... + Joachim Schrod% + \thanks{% + \protect\raggedright + R\"odermark, Germany. + Email: \texttt{jschrod@acm.org}% + }% + } +\date{% + Revision \RCSStyleRevision\\ + (as of \RCSStyleDate)% + } + +\maketitle + + + +% ------------------------------------------------------------ +% +% subdocument: The user interface of rcs.sty +% + +\input{rcs-user} + +% +% ------------------------------------------------------------ +% +% subdocument: The internal interface +% + +\input{rcs-conf} + +% +% ------------------------------------------------------------ + + + +\chap Implementation. + +This module reserves the namespace |rcs|. + +\beginprog +\ifx \rcs@loaded\undefined + \def\rcs@loaded{$StyleRevision: 2.10 $} +\else + \PackageWarningNoLine{rcs}% + {Some other package already uses namespace `rcs'} +\fi +\endprog + + +\sect Let's identify this package. + +Now I'm caught in a catch-22 situation. The code below---part of my +standard templates for \LaTeX{} packages---uses principles that are +explained later in this document. In particular, the explanation how +the information from the following RCS fields are gathered starts at +chunk~\ref{chunk:value-split}. + +There you'll find also the explanation for the funny strings behind +the RCS fields. Actually, I would not need them any more, they make +the initial document (before the first check-in) work. But they won't +be discarded in this package source, as they'll demonstrate another +utilization of RCS at work. + +\beginprog +\begingroup + \def\RCSPackage#1#2 $#3: #4 #5\endRCS $#6: #7 #8\endRCS{% + \def\date{#4}\def\id{v#7}% + \ProvidesPackage{#1}[\date\space\id\space #2]% + } + + \RCSPackage{rcs}{typeset info from RCS fields} + $StyleDate: 2003/02/02 20:42:38 $: 9999/00/00 \endRCS + $StyleRevision: 2.10 $: 0.0 \endRCS +\endgroup +\endprog + + +\sect This module is supported. Send bug reports, comments, and +repairs. + +The reference version may be retrieved via anonymous ftp from CTAN, +directory \path|/tex-archive/macros/latex/contrib/supported/rcs|. + + +\sect This is freely distributable software; you can redistribute it +and/or modify it under the terms of the GNU General Public License +(version~2) as published by the Free Software Foundation. + +This software is distributed in the hope that it will be useful, but +\textbf{without any warranty}; without even the implied warranty of +\textbf{merchantability} or \textbf{fitness for a particular purpose}. +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License in +the file |License| along with this package; if not, write to the Free +Software Foundation, Inc., 675~Mass Ave, Cambridge, MA~02139,~USA. + + +\sect Before we start we declare some shorthands for category codes. +By declaring the underscore~`(|_|)' as letter we can use it in our +macros. (I agree with {\sc D.~Knuth} that +|\identifier_several_words_long| is more readable than +|\IdentifierSeveralWordsLong| and in every case better than +|\p@@@s|.) As this is a \LaTeX{} style option the at sign is a letter +anyhow; so we can use the ``private'' Plain and \LaTeX{} macros; and +with the underscore we can make our own macros more readable. But as +we have to restore this category code at the end of this macro file +we store its former value in the control sequence |\CatUsCode|. This +method is better than to use a group because not all macros have to +be defined global this way. + +\beginprog +\ifx \CatEscape\undefined + \chardef\CatEscape=0 + \chardef\CatOpen=1 + \chardef\CatClose=2 + \chardef\CatIgnore=9 + \chardef\CatLetter=11 + \chardef\CatOther=12 + \chardef\CatActive=13 + + \chardef\CatUsCode=\catcode`\_ +\fi + +\catcode`\_=\CatLetter % top level macro file +\endprog + + + + +\chap Parsing RCS fields. + +Each RCS field consists of a keyword and an optional value. The value +is delimited by `\verb*|: |' from the keyword, this delimiter is +missing if no value does exist. At the end of a value there's always +a space. I.e., the possible input looks like one of the two following +lines: + % +\begin{quote} + \itshape + |\RCS $|Keyword\/|$|\\ + |\RCS $|Keyword\/\verb*|: |value\/\verb*| $| +\end{quote} + % +where \textit{Keyword} and \textit{value} may be arbitrary strings. In +fact, we assume that \textit{Keyword} is a sequence of letters---only +then the creation of a cseq |\RCS|\textit{Keyword} is sensible. Our +implementation will not produce an error with an obscure keyword, but +the result will not be of use for the author. +We must not depend on a fixed set of keywords, this style shall be +usable with a configurable RCS version. In such a version one can +bind arbitrary keywords to the information available in RCS\@. This +means we will parse all RCS fields with the same macro, +|\rcs_split_field|. This macro will place its results in two macros: +|\RCS_keyword| and |\RCS_value|. Afterwards we can bind the expansion +of |\RCS_value| to the target cseq. + + +\sect |\RCS_value| will be set to the expansion of |\RcsEmptyValue| +if there was no RCS value available, i.e., if the field was not +processed by RCS yet. This way the values of non-expanded RCS fields +can be configured. The default value is the empty token list. + +\beginprog +\def\RcsEmptyValue{} +\endprog + + +\sect For those fields where a special handling is demanded, a cseq +|\RcsHandle|\textit{Keyword} must exist. This cseq must handle the +parsing of the value. Usually this means that it will create a macro +named |\RCS|\textit{Keyword} with a transformed (or filtered) value. +If you happen to write a handler you might want to look at the +definition of |\RcsHandleDate| starting at section~\ref{sec:date} +If a special handler for a field exists, the original value is +placed automatically in the macro |\RCSRaw|\textit{Keyword}. This is done +before the handler is called. + + +\sect \label{chunk:value-split} The macro +|\rcs_split_field| will split the field into |\RCS_keyword| and +|\RCS_value|. This split is done by the argument parsing capability +of \TeX{}: We can separate parameters by token lists and \TeX{} will +use a shortest pattern match to determine the arguments. + +Let's look what kind of pattern we can use. As an example we use the +RCS field `\verb*|$Revision: 2.11 $|', i.e., the unexpanded field is +`|$Revision: 2.11 $|'. The macro |\RCS| will use dollars to delimit its +argument, we don't need to worry for them. Eventually we'll have to +discard the space of the expanded field's value---after all, +|\RCSRevision| shall expand to `1.1', not to `1.1~'. + +First, we can see that the token list $\it (colon, space)$ may be used +as the seperator of keyword and value: +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\(: \)1.1 \]\\end_value} +\end{quote} +% +($d_i$ is the separating token list between parameter $i$ and~$i+1$. +|#1| denotes the argument of |\RCS|. |\end_value| is a stop token, +used to delimit the last parameter; we have to supply this token at +the call. In fact, all tokens marked by $s$ and the dotted +line---i.e., those after |#1|---are supplied by us.) + +When we want this token list as a separator, we have to supply it for +the unexpanded field, since there is no $\it (colon, space)$ in there: +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\]\(: \)\\end_value} +\end{quote} +% +Then the call with the expanded field gets +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\(: \)1.1 \]: \\end_value} +\end{quote} + +Well, we want neither the space nor the colon and the other space +after the value---we have to get rid of them. We can utilize the fact +that no RCS field will ever have the token list $\it (space, colon)$ +in it. This means we can use it as a terminator for the RCS value: +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\(: \)1.1\( \]:\) \\end_value} +\end{quote} +% +Please note, one token of the delimiter~$d_2$ comes from the +|#1|~argument, the other from the tokens we'll add at the call. + +Let's check our unexpanded field again---we don't have $d_2$ there. We +have to add it by the caller: +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\]\(: \)\{\}\( :\)\\end_value} +\end{quote} +% +(Without the empty group the two spaces would be combined into one +token.) Going back to the expanded field, we notice that these +additional tokens do not harm us---we'll ignore everything after $d_2$ +anyhow. +% +\begin{quote} + \macroCall{\\rcs_split_field \[Revision\(: \)1.1\( \]:\) \{\} :\\end_value} +\end{quote} + +We can take another look at the whole affair and point out the +parameters we get for the split. Remember, that spaces after a control +word belong to this word. First, the expanded field: +% +\begin{quote} + \macroCall + [p]{\\rcs_split_field \[\(Revision\): \(1.1\) \]:\( \{\} :\)\\end_value} +\end{quote} +% +Then the unexpanded one: +% +\begin{quote} + \macroCall[p]{\\rcs_split_field \[\(Revision\)\]: \(\{\}\) :\(\|\)\\end_value} +\end{quote} +% +($p_3$, the third parameter will be empty in this case.) + +\medskip + +\noindent As explained above: if the value does not exist, a default +value is supplied. + +\beginprog +\def\rcs_split_field #1: #2 :#3\end_value{% + \def\RCS_keyword{#1}% + \def\RCS_value{#2}% + \ifx \RCS_value\empty + \let\RCS_value\RcsEmptyValue + \fi + } +\endprog + + +\sect |\RCS| triggers the split. After it has occured, we can bind the +expansion of |\RCS_value| to a new name. This name is constructed from +the prefix |RCS|, the string |Raw| iff a handle for this field exists, +and the keyword itself. + +Afterwards we call the handle, on non-existance this will be a no-op. + +Gathering the field is a bit more complicated, as we need to pay +attention to underscores in file names. + +\beginprog +\def\RCS{% + \bgroup + \catcode`\_ \CatActive + \RCS_get_argument + } +\def\RCS_get_argument $#1${% + \gdef\RCS_argument{#1}% + \egroup + \RCS_process + } + +\def\RCS_process{% + \expandafter\rcs_split_field \RCS_argument: {} :\end_value + \expandafter\let \csname RCS\rcs_raw_if_handle\RCS_keyword\endcsname + \RCS_value + \csname RcsHandle\RCS_keyword\endcsname + } +\def\rcs_raw_if_handle{% + \@ifundefined{RcsHandle\RCS_keyword}{}{Raw}% + } +\endprog + + + + +\chap Transforming the value of \Date{} fields. +\label{sec:date} + +When we implement the special handling for the \Date{} field, we take +care that we don't rely on the fact that the keyword is |Date|. +Certain RCS versions (one of them created at our site) allow the +configuration of the used keywords. I.e., there might be another +keyword used for this field, but we still want to use the +functionality provided here. +For example, let's assume the keyword of the \Date{} field is +|StyleDate|. Then the assignment +% +\begin{quote} + |\let\RcsHandleStyleDate=\RcsHandleDate| +\end{quote} +% +is all that's needed to turn on the `date special handling' for this +field. (In fact, that's done in this style file you're reading.) + + +\sect The special handler for \Date{} fields sets up +|\RCS|\textit{Keyword} (|\RCSDate| usually) to produce a textual +representation of the date part of the \Date{} value in a +|\today|-like format. Thus the constructed tag can be used in many +circumstances, e.g., as the argument of the |\date| tag on the +titlepage. + +In addition, |\RCSTime| is defined; it expands to the checkin time. + +If the value is empty, i.e., if there's no \Date{} value from RCS +available, we use the current date. Later we might supply the current +time, too---currently |\RCSTime| expands to an empty token list in +such a case. +Of course, this whole special handling is only done if |\today| is +defined in some way; otherwise we just handle the \Date{} field like +every other RCS field: The value is stored unfiltered in +|\RCS|\textit{Keyword}. + +\beginprog +\def\RcsHandleDate{% + \ifx \today\undefined + \expandafter\let \csname RCS\RCS_keyword\endcsname \RCS_value + \else + \ifx \RCS_value\RcsEmptyValue + \@namedef{RCS\RCS_keyword}{\today}% + \let\RCSTime\empty + \else + \expandafter\rcs_set_date \RCS_value\end_date + \fi + \fi + } +\endprog + + +\sect If the value is not empty we split it using the argument parsing +mechanism of \TeX{}. Then we'll define the value using the current +definition of |\today|. This way language-specific styles (e.g., from +the \textsf{babel} system) may supply their own way to present a date. + +\beginprog +\def\rcs_set_date #1/#2/#3 #4\end_date{% + \begingroup + \day #3 % <-- space! + \month #2 % <-- space! + \year #1 % <-- space! + \expandafter\xdef \csname RCS\RCS_keyword\endcsname {\today}% + \endgroup + \def\RCSTime{#4}% + } +\endprog + + + + +\chap Typesetting revision logs. + +If a revision log is to be typeset, we demand a special format. +Namely, it is to be enclosed in the |rcslog| environment. This +environment has an optional parameter, the configuration tokens. The +contents of the environment is the \Log{} field followed by a list of +revision entries. The \Log{} field must be on a line of its own. Each +revision entry is introduced by a line consisting of the tag +|\Revision|, the revision number, the checkin date, the checkin time, +and the author's user id. + +I.e., the input looks like the following example sketch, where italic +material is substituted by current values. +% +\begin{quote} + \chardef\\=`\\ % just for the example + \chardef\{=`\{ + \chardef\}=`\} + \begin{alltt}\frenchspacing +\\begin\{rcslog\} +$Log: rcs.doc,v $ +Revision 2.11 2003/02/02 22:30:22 schrod +Removed dependeny on \LaTeX2.09 font selection commands. (Though +they're still used in the package documentation, as convenience.) + +\\Revision {\it revision date time uid} +\qquad {\it log text\/} + +\quad \([\,\ldots\) {\it perhaps more entries\/} \(\ldots\,]\) + +\\end\{rcslog\} + \end{alltt} +\end{quote} + +We typeset the revision log similar to a |description| environment. +Each revision entry is an item. + + +\sect The tag for the log intro is implemented as a token register. In +fact, |\rcsLogIntro| is a hook. + +\beginprog +\newtoks\rcsLogIntro + \rcsLogIntro={} +\endprog + + +\sect The author names are stored in a table named |rcs_author|. We +supply the lookup macro |\RCS_get_author|, which expands to the table +value or to the table key itself. + +\beginprog +\def\rcsAuthor#1#2{\@namedef{rcs_author:#1}{#2}} +\def\RCS_get_author#1{% + \@ifundefined{rcs_author:#1}{#1}{\@nameuse{rcs_author:#1}}% + } +\endprog + + +\sect Since this style option shall be usable with many styles, we +must provide means to configure its behaviour. In particular, it must +be possible to configure the layout. What remains fixed, is the layout +of the log like a |description| list. I might add this flexibility if +there is enough interest (or if somebody sends me tested changes). + +The first thing to parametrize is the overall layout and the header. +This is set up by |\RcsLogStyle|. This cseq \emph{must} define +|\RcsLogHeading|, which is the macro to set the header. E.g., here +one could insert a |\newpage| to start a new page for the revision log. + +In addition, we reduce the base size of the log. That's the reason why +these two configurations are combined in one macro---if you change +one, you also have to consider to change the other. + +\beginprog +\def\RcsLogStyle{% + \def\RcsLogHeading{\subsubsection*}% + \footnotesize + } +\endprog + + +\sect The header itself is created by |\rcs_log_hdr|, which is called +with the expanded \Log{} value as its argument, terminated by +|\end_value|. We use \TeX{}'s parameter parsing mechanism to chop off +the tail of the value---if the value exists, it always ends in~`|,v|'. +Since only an existing value ends in~`|,v|', we have to supply a +fitting empty value. We will use |\rcs_empty_log_value| for that. + +The empty log value gets a bit more complicated: If we have an empty +\Log{} value, we will not have any revision entries. (Well, except in +pathological cases. Then we will produce spurious text.) Missing +revision entries are missing items; since \LaTeX{} will complain +about a missing |\item|, we must provide one to stop it from doing +so. But here is no place for such tokens, the list environment hasn't +started yet. We will set the flag |@rcs_empty_log@| and check this +flag after we invoked the list. + +\beginprog +\def\rcs_log_hdr#1,v\end_value{% + \@rcs_empty_log@false + \RcsLogHeading{\RcsLogHeadingName #1}% + \the\rcsLogIntro + } +\def\rcs_empty_log_value{% + \global\@rcs_empty_log@true % that's most probably in a group! + \RcsUnknownFile % text for unknown file name + ,v% % assert calling env + } +\newif\if@rcs_empty_log@ +\endprog + + +\sect The user might want to adapt the text output. He can do so by +redefining |\RcsLogHeadingName|, |\RcsUnknownFile|, and |\RcsEmptyLog|. + +\beginprog +\def\RcsLogHeadingName{Revision Log for \ttfamily} % file name in monospace +\def\RcsUnknownFile{\rmfamily\mdseries $\langle\,$Unknown file name$\,\rangle$} +\def\RcsEmptyLog{{\itshape No log entries available.}} +\endprog + + +\sect OK, we have fixed the header, let's address the entries. Each +entry is typeset by |\RcsLogRevision| which is called with four +arguments: (1)~the revision number, (2)~the checkin date, (3)~the +checkin time, and (4)~the uid of the author. + +Such an entry is inserted as an item in the list. The uid is +transformed to an author name, if the respective information is +available. The checkin timestamp is mapped to a neater appearance by +|\RcsLogDate| and |\RcsLogTime|. + +\beginprog +\def\RcsLogRevision#1#2#3#4{% + \item [Revision #1]% + (created at \RcsLogDate #2\endDate\space \RcsLogTime{#3} % <-- space! + by \RCS_get_author{#4})\\\relax + } +\endprog + + +\sect |\RcsLogDate| sets the date. We can use \TeX{}'s parameter parsing +mechanism to separate the date value (passed as the argument) in its +sub-values. The code is very similar to |\rcs_set_date|. + +|\RcsLogTime| sets the time. As explained in the user manual, the time +is ignored usually. (I don't think that this info is relevant in a +printout.) Here we assume something about the context it's expanded +in: Spaces will be before and after the tag. One of them must be +discarded. The user option |\settime| is implemented here as a +private macro, too. + +\beginprog +\def\RcsLogDate #1/#2/#3\endDate{% + \begingroup + \day #3 % <-- space! + \month #2 % <-- space! + \year #1 % <-- space! + \today + \endgroup + } + +\def\RcsLogTime#1{\ignorespaces} +\def\rcs_settime{% + \def\RcsLogTime##1{[##1]}% + } +\endprog + + +\sect Well, that are all possibilities to configure the revision log. +Let's put together the pieces. Within the |rcslog| environment the +tags |\Revision| and |\settime| are used, they are implemented in +the |rcs| namespace. + +At the start, we use the optional argument of the environment to +configure it. |\settime| might be placed here, or font switches, etc. + +The next entity shall be the \Log{} field. In fact, it shall be on +the next line. If an optional environment argument was there, the +newline is still in the input and must be discarded before we can use +|\RCS| to parse the field. + +\beginprog +\def\rcslog{% + \@ifnextchar[% % ] (Emacs) + \rcslog_configure + {\rcslog_configure[]}% + } +\def\rcslog_configure[#1]{% + \let\Revision\rcslog_revision + \let\settime\rcs_settime + \RcsLogStyle + #1% + \afterassignment\rcslog_skipcr + \let\next + } +\endprog + + +\sect There are users---programmer's life would be so nice without +them. An empty line (i.e., a |\par|) might have been inserted between +|\begin{rcslog}| and the \Log{} field. There might be even other +garbage between them. We have to check these possibilities and provide +proper responses. + +\beginprog +\def\rcslog_skipcr{% + \ifx \next $% + \def\next{\rcslog_field $}% + \else\ifx \next\par + \let\next\rcslog_field + \else + \PackageError{rcs}{Missing RCS Log field in environment}{% +The RCS Log field must be the very first text in the rcslog\MessageBreak +environment. I will discard the rest of your input line and try to\MessageBreak +recover then. If you think this won't work, exit now.\MessageBreak +Otherwise press <Return> and cross your fingers!} + \let\next\rcslog_discard_line + \fi\fi + \next + } +\endprog + + +\sect This is the code for the luser. He provided tokens we didn't +wait for---we discard them and check anew if we've got it right now. +(Remember, we're waiting for the `|$|' of the \Log{} field.) %$ Emacs + +\beginprog +\def\rcslog_discard_line{% + \begingroup + \obeylines + \rcslog_gobble_line + } +\begingroup +\obeylines +\gdef\rcslog_gobble_line #1^^M{% + \endgroup% + \afterassignment\rcslog_skipcr% + \let\next% + } +\endgroup +\endprog + + +\sect Yep, we've reached a dollar; let's hope that it's our \Log{} +field. It must be on one line, this line is fetched first and then +analyzed. + +\beginprog +\def\rcslog_field{% + \begingroup + \obeylines + \catcode`\_ \CatActive + \rcslog_get_field + } + +\begingroup +\obeylines +\gdef\rcslog_get_field $#1$^^M{% + \gdef\RCS_argument{#1}% + \endgroup% + \rcslog_set_field% + } +\endgroup +\endprog + + +\sect When we analyze the \Log{} field, we must supply the default +value. Within the log list there will be no other RCS fields, +therefore we can redefine |\RcsEmptyValue| in this environment. + +The header gets passed the expanded \Log{} value, as explained above. +We use |\RCS_value| instead of |\RCSLog| since we don't know which +RCS keyword is used. + +At last, we start the list and check the |@rcs_empty_log@| flag, +perhaps we have to supply a dummy |\item|. + +\beginprog +\def\rcslog_set_field{% + \let\RcsEmptyValue\rcs_empty_log_value + \RCS_process + \expandafter\rcs_log_hdr \RCS_value\end_value + \list{}\RcsLogListStyle % empty label, layout configurable + \if@rcs_empty_log@ + \item []\RcsEmptyLog % supply missing item + \fi + } +\endprog + + +\sect The setup of the log list is done by a macro from the protected +interface, the user shall be able to change it. In the default +supplied, there is no skip between paragraphs, but a quad indentation. +|rcslog| is here no list environment in the sense like |itemize| or +|enumerate|, therefore a usage of these environments within an entry +shall result in top-level item markers. + +\textbf{Caveat}:\quad Since we globally set |\@listdepth| at the start +of the environment, we must not execute |\endlist| that decrements it. +Instead we use |\endtrivlist| for the termination of the |rcslog| +environment. It might be, that this must be changed if +|\RcsLogListStyle| is changed. + +\beginprog +\def\RcsLogListStyle{% + \global\@listdepth\z@ + \labelwidth\z@ % item label w/o fixed size + \itemindent -\leftmargin % move label before start of line + \advance\itemindent \labelsep % label was moved too much + \def\makelabel##1{\bf ##1}% % how to typeset labels + \parsep\z@skip % no space between pars in items + \listparindent 1em % <-- space! indent pars in items + }% + +\let\endrcslog\endtrivlist +\endprog + + +\sect The arguments of |\Revision| are separated by spaces and +terminated by the end of the line. We have to fetch them, then we can +pass them to |\RcsLogRevision| which does the real work. + +\beginprog +\def\rcslog_revision{% + \begingroup + \obeylines + \rcslog_get_revinfo + } + +\begingroup +\obeylines +\gdef\rcslog_get_revinfo #1 #2 #3 #4^^M{% + \endgroup% + \RcsLogRevision{#1}{#2}{#3}{#4}% + } +\endgroup +\endprog + + + + +\chap Convenience tags. + +As a shortcut we +support the direct supply of the checkin date for the titlepage +material. Here we also take care not to depend on the keyword. + +\beginprog +\def\RCSdate $#1${% + \RCS $#1$% + \expandafter\date \expandafter{\csname RCS\RCS_keyword\endcsname}% + } +\endprog + + +\sect |\RCSID| parses the RCS field and redefines the footline. This +tag is from Nelson's |rcs| style. In his style he defines that the RCS +field is passed as an argument to the macro. To be upward compatible, +we have to support this as well: We look at the next token, if it is +an opening brace we fetch the param and trigger the `real' invocation +by |\rcs_id|. If no brace follows, we call |\rcs_id| immediately. + +\beginprog +\def\RCSID{% + \@ifnextchar\bgroup + \rcsid_get_field + \rcs_id + } +\def\rcsid_get_field#1{\rcs_id #1} +\endprog + + +\sect As a side effect, we'll produce the normal value tags. When we +define the footline, we must assert that |\RCS_keyword| and +|\RCS_value| are expanded. (They will get new bindings at the next +invocation of |\RCS|.) All other macros must not be expanded, they +shall be used in the context of the footline, not in our definition +context. We utilize |\protect| for that, |\framebox| is the only macro +that must be protected. + +\beginprog +\def\rcs_id $#1${% + \RCS $#1$% + \begingroup + \let\protect\noexpand + \xdef\@oddfoot{% + \reset@font + \protect\framebox[\textwidth]{\RCS_keyword: \RCS_value}% + }% + \endgroup + \global\let\@evenfoot\@oddfoot + } +\endprog + + +\sect |\RCSdef| just outputs its parameter before it's passed to +|\RCS|. This tag is from Tom Verhoeff's |rcs| style. In fact, we're +not fully compatible: Tom did output `RCS keyword string'. I +substitute this by `RCS field', this is consistent with the rest of +this style's description. + +\beginprog +\def\RCSdef $#1${% + \typeout{RCS field: $#1$}% + \RCS $#1$% + } +\endprog + + + + +\chap The end. + +Well, after all we're finished with this style. We must not forget to +restore the underscore catcode. + +\beginprog +\catcode`\_=\CatUsCode + +\endinput +\endprog + + +\sect I would like to thank those who helped me to improve this style. +% In particular, XXX provided XXXsubstantial parts of the code. + +\textsc{Marcus Speh} pointed out that Nelson's style option exists. +\textsc{Lee Wittenberg} pointed out that Tom style option exists---Tom +posted the style option on |comp.programming.literate| afterwards. I +borrowed the idea of appending a second colon to the call of +|\rcs_split_field| from Tom's style. \textsc{Harald Fuchs} asked for the +possibility to configure the log list layout. + +\textsc{Dave Love} brought the problem with the |-kv| option of |co| to +my attention. It's a pitty that I haven't found a solution yet. (I +mean, one that convinces me.) + +\textsc{Christine Detig} told me where my documentation was +uncomprehensible. In particular, you won't have the visual explanation +of |\rcs_split_field| without her. barbara beeton proofread the user +manual. In addition, she pointed out where a non-programmer does not +understand it. + +After 7.5 years of quiteness, \textsc{Martin Kneißl} emerged and asked +for support of underscores in file names. He got it, and I used the +opportunity to update contact information. + + + +\vskip \PltxPreSectSkip + +\rcsLogIntro{Of course, we shouldn't stop without the RCS log of this + style file.} + + +\begin{rcslog} +$StyleLog: rcs.doc,v $ +\Revision 2.10 2003/02/02 20:42:38 schrod +Support underscores in file names in RCS field values. E.g., in +\rcsField{Id} or \Log{}. + +Update my contact information. + +\Revision 2.9 1995/08/02 12:09:07 schrod +Transformed this style option into a \LaTeXe{} package. + +Updated to \LaTeXe{}. + +\Revision 2.8 1993/11/10 12:29:49 schrod +Added acknowledgement of barbara. + +\Revision 2.7 1993/11/08 20:15:15 schrod +Added possibility to configure the layout of the log list +(|\RcsLogListStyle|). + +Now the log list is on level~0. Thereby item lists or enumerations in +revision entries get first-level labels. This has consequences for +the configuration, this implementation strategy must therefore be +specified in the internal interface description. + +\Revision 2.6 1993/11/03 20:04:57 schrod +Cleaned up for distribution: Added email address to each document, +added copyright info to |rcs.doc|, added acknowledgements. Checked my +English and the spacing. + +Explained the restriction concerning the |-kv| option of |co|. + +Rewrote the explanation to |\rcs_split_field|. Added the visual clues +to explain the (mis?)usage of macro expansion and pattern matching. + +\Revision 2.5 1993/11/02 20:02:51 schrod +Implemented |\RCSdef|. + +Deleted unnecessary macro that did discard the space of an RCS value. +Moved this in the parameter context of |\rcs_split_field|. Added an +explanation to |\RCS| where it is called. + +\Revision 2.4 1993/11/02 18:44:49 schrod +Implemented |\RCSID|.\\ +Need |\reset@font| now, for the definition of the footline in |\RCSID|. + +Paragraphs in revision logs are not separated by vertical space any +more. They are indented instead. I use the ``classic'' indentation of +one quad. + +\Revision 2.3 1993/11/01 19:49:49 schrod +Added subdocument about the internal interface. + +Cleaned the cseq names: All public names start with `|RCS|' or +`|rcs|', protected names start with `|Rcs|', both have only letters. +Observer names start with `|RCS|', internal names with `|rcs|', both +feature non-letters in the names. + +\Revision 2.2 1993/11/01 19:20:58 schrod +Cleaned up the documentation. The enhancement of the |rcslog| +environment was just appended, now it's integrated in the whole +document. Improved the explanation of the implementation: the valid +input is now explained more clearly. + +Use |rcs-doc.sty| for documentation of |rcs| style. It does not only +load style options, but does also define |\RCSStyleRevision| for +access of the style's revision. + +Added hint that the user manual is urgently needed.\\ + The load tag is now in the protected interface.\\ + Commented out section with definition of |\reset@font|, that cseq is +not needed in the implementation.\\ + OALD tells me to use ``heading'' instead of ``header.'' + +\Revision 2.1 1993/10/29 19:07:38 schrod +Reorganized the source structure---the style gets too large to keep +everything in one directory. I use the usual setup for my larger +styles. + +Changed the RCS keywords. All keywords in use now start with +`|Style|'. Stuff in the text which looks like RCS fields, but where +the keywords do not start with `|Style|', are examples! + +\Revision 1.3 1993/10/29 18:08:19 schrod +Each field value supplied by RCS ends with a space; this space is +discarded. + +Supports the typesetting of revision logs. The overall documentation +is not yet fully integrated. Of course, our own revision log is +typeset at the end, too.\\ + But we'll have to use other RCS keywords for this document in the +future. E.g., I can't use original RCS keywords currently in the +examples without much hassle. + +An hook for the configuration of this style option is provided. + +\Revision 1.2 1993/09/08 15:49:00 schrod +Use canonical names for category codes. + +\Revision 1.1 1993/09/03 21:01:29 schrod +Re-implemented |rcs| style option. Made it a documented option. + +\end{rcslog} + + + + +\end{document} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Local Variables: +mode: LaTeX +TeX-brace-indent-level: 4 +indent-tabs-mode: t +TeX-auto-untabify: nil +TeX-auto-regexp-list: LaTeX-auto-regexp-list +End: diff --git a/Master/texmf-dist/source/latex/rcs/src/style/rcs.el b/Master/texmf-dist/source/latex/rcs/src/style/rcs.el new file mode 100644 index 00000000000..3f090a4f450 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/style/rcs.el @@ -0,0 +1,65 @@ +;;; $Id: rcs.el,v 1.6 1995/08/02 10:59:53 schrod Exp $ +;;;---------------------------------------------------------------------- + +;;; +;;; AUC-TeX style hook for rcs style option +;;; +;;; (history at end) + + +(TeX-add-style-hook "rcs" + (function + (lambda () + (LaTeX-add-environments "rcslog") + (TeX-add-symbols + ;; public interface + "RCS" ; define \RCS... tag + "RCSTime" ; holds time of Date field + "RCSdate" ; typeset date + "RCSID" ; put RCS field in footline + "RCSdef" ; like \RCS, & output on console + "settime" ; local in env rcslog: set rev time + "rcsAuthor" ; maps uid to full name + "rcsLogIntro" ; intro text to rev log + ;; protected interface + "RcsEmptyValue" ; used as value for unexpanded fields + "RcsHandleDate" ; handler for Date field + "RcsLogStyle" ; define style of RCS log + "RcsLogListStyle" ; define style of log list + "RcsLogHeading" ; heading of RCS log + "RcsLogDate" ; how the date is typeset + "RcsLogTime" ; how the time is typeset + ;; internationalization + "RcsLogHeadingName" ; text in heading of RCS log + "RcsUnknownFile" ; used if Log value is empty + "RcsEmptyLog" ; used as empty Log text + "RcsLogRevision" ; `real name' of \Revision + ;; protected observers -- must not be redefined + "RCS_keyword" ; keyword of last parsed field + "RCS_value" ; value of last parsed field + "RCS_get_author" ; get the full name of an author + ) + ))) + + +;;;====================================================================== +;; +;; $Log: rcs.el,v $ +;; Revision 1.6 1995/08/02 10:59:53 schrod +;; \RcsLoadHook & \RcsLoaded don't exist any more. +;; +;; Revision 1.5 1993/11/08 20:17:18 schrod +;; New tag in protected interface: \RcsLogListStyle +;; +;; Revision 1.4 1993/11/02 21:10:22 schrod +;; New tag in public interface: \RCSdef +;; +;; Revision 1.3 1993/11/02 18:45:43 schrod +;; New tag in public interface: \RCSID +;; +;; Revision 1.2 1993/11/02 16:15:08 schrod +;; Adapted to interface of StyleRevision 2.3. +;; +;; Revision 1.1 1993/10/29 18:14:47 schrod +;; Preliminary version, doesn't care about macro args. +;; diff --git a/Master/texmf-dist/source/latex/rcs/src/style/rcs.elc b/Master/texmf-dist/source/latex/rcs/src/style/rcs.elc Binary files differnew file mode 100644 index 00000000000..8805dc22a35 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/style/rcs.elc diff --git a/Master/texmf-dist/source/latex/rcs/src/test/Imakefile b/Master/texmf-dist/source/latex/rcs/src/test/Imakefile new file mode 100644 index 00000000000..04bd008c25f --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/Imakefile @@ -0,0 +1,44 @@ +XCOMM $Id: Imakefile,v 1.2 1995/08/02 12:21:39 schrod Exp $ +/* ---------------------------------------------------------------------- */ + +/* + * Imakefile for test of rcs package + * + * (history at end) + */ + + +/* needed modules */ +#include <TeX.imk> + +XCOMM ------------------------------------------------------------ +XCOMM continue in Imakefile + + +regression:: clean + $(MAKE) all + + +TeXTarget(latex,empty-log) +TeXTarget(latex,rcsdef) +TeXTarget(latex,rcsid-param) +TeXTarget(latex,rcsid) + +TeXTarget(latex '\scrollmode \input',log-error) + + +/* ============================================================ + * + * $Log: Imakefile,v $ + * Revision 1.2 1995/08/02 12:21:39 schrod + * Add regression target. + * + * Revision 1.1 1995/08/02 11:38:22 schrod + * Substituted Makefile by Imakefile. + * + + * ------------------------------------------------------------ + * Local Variables: + * mode: Indented-Text + * End: + */ diff --git a/Master/texmf-dist/source/latex/rcs/src/test/Makefile b/Master/texmf-dist/source/latex/rcs/src/test/Makefile new file mode 100644 index 00000000000..a6161590c5d --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/Makefile @@ -0,0 +1,218 @@ +# Makefile generated by imake - do not edit! +# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ + +# $ITI: Imake.tmpl,v 1.5 1995/01/24 17:48:12 schrod Exp $ +#---------------------------------------------------------------------- +# Makefile generated from "Imake.tmpl" and <Imakefile> +# +# Top level imake template of `Imake module edition'. +# + +default: all + +# ====================================================================== +# MIT & XFree configuration files +# $ITI: MIT-config.imk,v 1.5 1997/01/14 10:30:25 herr Exp $ + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that need to come before +# the platform-specific parameters - edit site.def to change + +# $ITI: site.def,v 1.8 1997/02/05 12:53:48 herr Exp $ +# +# ITI site definitions +# +# starting from original MIT version + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + +# ------------------------------------------------------------------------- +# platform-specific configuration parameters - edit x386.cf to change + +# $ITI: x386.cf,v 1.3 1994/06/30 17:03:54 schrod Exp $ +# $XFree86: mit/config/x386.cf,v 2.44 1994/04/16 04:20:56 dawes Exp $ +# platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $ + +# operating system: Linux + +# ------------------------------------------------------------------------- +# site-specific configuration parameters that go after +# the platform-specific parameters - edit site.def to change + +# $ITI: site.def,v 1.8 1997/02/05 12:53:48 herr Exp $ +# +# ITI site definitions +# +# starting from original MIT version + +# site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + KMEMGROUP = kmem + +# ====================================================================== +# Imake template with basic definitions +# $ITI: Base.imk,v 1.6 1995/07/11 16:24:09 deeken Exp $ + +.SUFFIXES: + +.SUFFIXES: .o + +# ====================================================================== +# site specific configuration of Imake modules +# for THD ITI installations +# $ITI: iti-site.imk,v 1.13 1997/05/30 09:54:37 herr Exp $ + + LOCALDIR = /usr/local + +# ------------------------------------------------------------ +# Imake template for operations on files +# $ITI: files.imk,v 1.6 1998/02/24 15:39:05 kehr Exp $ + + COPYIF = copyif + CPP = /lib/cpp + LN = ln -s + MAKEDIR = mkdir -p + MV = mv + RM = /bin/rm -f + +### + +# ------------------------------------------------------------ +# Imake template for use of imake & makedepend +# $ITI: imake.imk,v 1.10 1998/02/24 15:39:06 kehr Exp $ + +### + + IMAKE = imake + + IMAKE_STD_OPTIONS = + IMAKE_STD_INCLUDES = -I$(LOCALDIR)/lib/imake-modules + IMAKE_STD_DEFINES = + + IMAKE_FLAGS = $(IMAKE_OPTIONS) $(IMAKE_EXTRA_OPTIONS) $(IMAKE_STD_OPTIONS) $(IMAKE_INCLUDES) $(IMAKE_EXTRA_INCLUDES) $(IMAKE_STD_INCLUDES) $(IMAKE_DEFINES) $(IMAKE_EXTRA_DEFINES) $(IMAKE_STD_DEFINES) + +### + + MAKE = make + SHELL = /bin/sh + +### + + TOPDIR = . + CURDIR = . + THISDIR = `basename $(CURDIR)` + + MAKEOVERRIDES = + +### + +depend:: + touch .dependdummy + $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" .dependdummy + $(RM) .dependdummy + + DEPEND = makedepend + DEPENDFLAGS = + +### + + SUBDIRS = + +########################################################################### +# start of Imakefile + +# $Id: Imakefile,v 1.2 1995/08/02 12:21:39 schrod Exp $ + +# ====================================================================== +# Imake template for TeX & friends +# $ITI: TeX.imk,v 1.2 1995/08/04 16:40:19 schrod Exp $ + + TEX_IT = tex-it + TEXI2DVI = texi2dvi + +# default rule created by TeX.imk + +clean:: + $(RM) *.dvi *.log *.aux *.toc *.lo[ft] *.blg *.idx *.ilg + +realclean:: + $(RM) *.bbl *.ind + +# ------------------------------------------------------------ +# continue in Imakefile + +regression:: clean + $(MAKE) all + +all:: empty-log.dvi + +empty-log.dvi: empty-log.tex + $(TEX_IT) latex $(TEX_FMT_OPTIONS) empty-log.tex + +all:: rcsdef.dvi + +rcsdef.dvi: rcsdef.tex + $(TEX_IT) latex $(TEX_FMT_OPTIONS) rcsdef.tex + +all:: rcsid-param.dvi + +rcsid-param.dvi: rcsid-param.tex + $(TEX_IT) latex $(TEX_FMT_OPTIONS) rcsid-param.tex + +all:: rcsid.dvi + +rcsid.dvi: rcsid.tex + $(TEX_IT) latex $(TEX_FMT_OPTIONS) rcsid.tex + +all:: log-error.dvi + +log-error.dvi: log-error.tex + $(TEX_IT) latex '\scrollmode \input' $(TEX_FMT_OPTIONS) log-error.tex + +# ------------------------------------------------------------------------- +# common rules for all Makefiles - do not edit + +Makefile:: + @if [ -f Makefile ]; \ + then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else set -x; fi ; \ + $(IMAKE) $(IMAKE_FLAGS) -DImakeTopDir=$(TOPDIR) -DImakeCurrentDir=$(CURDIR); \ + set +x + +Makefiles:: + @case "$(MAKEFLAGS)" in *[ik]*) set +e;; esac; \ + case "$(TOPDIR)" in \ + /?*) newtop=$(TOPDIR) ;; \ + *) newtop=../$(TOPDIR) ;; \ + esac; \ + test "$(SUBDIRS)" -o "$(SUBDIRS)" = "NullParameter" && \ + for d in $(SUBDIRS) '' ; \ + do if [ empty$$d != empty ] ; \ + then echo "making Makefiles in $(CURDIR)/$$d ..."; \ + $(MAKE) subdirMakefiles SUBDIR=$$d TOPDIR=$$newtop CURDIR=$(CURDIR)/$$d ; \ + fi ; \ + done || \ + exit 0 + +subdirMakefiles:: + @cd $(SUBDIR) ; \ + if [ -f Makefile ]; \ + then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else set -x; fi ; \ + $(IMAKE) $(IMAKE_FLAGS) -DImakeTopDir=$(TOPDIR) -DImakeCurrentDir=$(CURDIR); \ + set +x ; \ + $(MAKE) Makefiles + +clean:: + $(RM) $(CLEAN_EXTRA_FILES) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* + +# ------------------------------------------------------------------------- +# default rules for Imakefiles that do not generate them - do not edit + +all:: + +# ------------------------------------------------------------------------- +# dependencies generated by makedepend + diff --git a/Master/texmf-dist/source/latex/rcs/src/test/empty-log.tex b/Master/texmf-dist/source/latex/rcs/src/test/empty-log.tex new file mode 100644 index 00000000000..957ac176a85 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/empty-log.tex @@ -0,0 +1,21 @@ +% $Id: empty-log.tex,v 1.3 1995/08/02 11:39:01 schrod Exp $ +%---------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{rcs} + +\nofiles % fewer files in directory + +\begin{document} + +This is a test. + +\tracingcommands=2 +\tracingmacros=2 + +\begin{rcslog} +$Log$ +\end{rcslog} + +\end{document} diff --git a/Master/texmf-dist/source/latex/rcs/src/test/german.tex b/Master/texmf-dist/source/latex/rcs/src/test/german.tex new file mode 100644 index 00000000000..f133229c9a6 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/german.tex @@ -0,0 +1,41 @@ +% $Id: german.tex,v 1.1 2003/02/02 22:21:59 schrod Exp $ +%---------------------------------------------------------------------- + +% +% test for bad log entry +% +% [LaTeX] +% (history at end) + + + +\documentclass{article} + +\usepackage{german} + +\usepackage{rcs} +\rcsAuthor{schrod}{Joachim Schrod} + +\usepackage{shortvrb} +\MakeShortVerb\| + +\nofiles + +\begin{document} + +\makeatletter +\tracingcommands=2 +\tracingmacros=2 + +\title{Dokument mit RCS-Feldern} +\author{Joachim Schrod} +\RCSdate $Date: 2003/02/02 22:21:59 $ + +\maketitle + +Ein Test-Dokument. + +\end{document} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/source/latex/rcs/src/test/log-error.tex b/Master/texmf-dist/source/latex/rcs/src/test/log-error.tex new file mode 100644 index 00000000000..41f0d5a7d7a --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/log-error.tex @@ -0,0 +1,41 @@ +% $Id: log-error.tex,v 1.1 1995/08/02 11:37:32 schrod Exp $ +%---------------------------------------------------------------------- + +% +% test for bad log entry +% +% [LaTeX] +% (history at end) + + + +\documentclass{article} + +\usepackage{rcs} +\usepackage{shortvrb} +\MakeShortVerb\| + +\nofiles + +\begin{document} + +\begin{rcslog} + +$Log: log-error.tex,v $ +\Revision 1.1 1995/08/02 11:37:32 schrod +Add test case for |rcslog| environment with problems \& errors. + +\end{rcslog} + +\begin{rcslog} +Garbage +$Log: log-error.tex,v $ +\Revision 1.1 1995/08/02 11:37:32 schrod +Add test case for |rcslog| environment with problems \& errors. + +\end{rcslog} + +\end{document} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/source/latex/rcs/src/test/log.tex b/Master/texmf-dist/source/latex/rcs/src/test/log.tex new file mode 100644 index 00000000000..22de7dd4f58 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/log.tex @@ -0,0 +1,38 @@ +% $Id: log.tex,v 1.1 2003/02/02 20:27:57 schrod Exp $ +%---------------------------------------------------------------------- + +% +% test for bad log entry +% +% [LaTeX] +% (history at end) + + + +\documentclass{article} + +\usepackage{rcs} +\rcsAuthor{schrod}{Joachim Schrod} + +\usepackage{shortvrb} +\MakeShortVerb\| + +\nofiles + +\begin{document} + +\makeatletter +\tracingcommands=2 +\tracingmacros=2 + +\begin{rcslog} +$Log: log.tex,v $ +\Revision 1.1 2003/02/02 20:27:57 schrod +Initial revision. + +\end{rcslog} + +\end{document} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/source/latex/rcs/src/test/rcsdef.tex b/Master/texmf-dist/source/latex/rcs/src/test/rcsdef.tex new file mode 100644 index 00000000000..84df16a8a68 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/rcsdef.tex @@ -0,0 +1,24 @@ +% $Id: rcsdef.tex,v 1.3 2003/02/02 13:34:16 schrod Exp $ +%---------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{rcs} + +\nofiles % fewer files in directory + +%\makeatletter +%\tracingcommands=2 +%\tracingmacros=2 + +\def\RcsEmptyValue{$\rm \langle Unknown \rangle$} +\RCSdef $Revision: 1.3 $ +\RCSdef $Keyword$ + +\begin{document} + +Revision is \RCSRevision. + +RCS tag \texttt{Keyword} is \RCSKeyword. + +\end{document} diff --git a/Master/texmf-dist/source/latex/rcs/src/test/rcsid-param.tex b/Master/texmf-dist/source/latex/rcs/src/test/rcsid-param.tex new file mode 100644 index 00000000000..a9adec49a72 --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/rcsid-param.tex @@ -0,0 +1,21 @@ +% $Id: rcsid-param.tex,v 1.2 1995/08/02 11:39:02 schrod Exp $ +%---------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{rcs} + +\nofiles % fewer files in directory + +\makeatletter +\tracingcommands=2 +\tracingmacros=2 + +\def\RcsEmptyValue{$\rm \langle Unknown \rangle$} +\RCSID{$Revision: 1.2 $} + +\begin{document} + +RCS field as arg of \verb|\RCSID|. + +\end{document} diff --git a/Master/texmf-dist/source/latex/rcs/src/test/rcsid.tex b/Master/texmf-dist/source/latex/rcs/src/test/rcsid.tex new file mode 100644 index 00000000000..3dc444d8b8f --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/rcsid.tex @@ -0,0 +1,27 @@ +% $Id: rcsid.tex,v 1.2 1995/08/02 11:39:02 schrod Exp $ +%---------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{rcs} + +\nofiles % fewer files in directory + +\makeatletter +\tracingcommands=2 +\tracingmacros=2 + +\def\RcsEmptyValue{$\rm \langle Unknown \rangle$} +\RCSID $Revision: 1.2 $ + +\begin{document} + +Test document has revision \RCSRevision. + +First page % odd footline + +\newpage{} + +Second page % even footline + +\end{document} diff --git a/Master/texmf-dist/source/latex/rcs/src/test/under_score.tex b/Master/texmf-dist/source/latex/rcs/src/test/under_score.tex new file mode 100644 index 00000000000..d521ad9d17a --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs/src/test/under_score.tex @@ -0,0 +1,34 @@ +% $Id: under_score.tex,v 1.3 2003/02/02 20:27:04 schrod Exp $ +%---------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{rcs} + +\nofiles % fewer files in directory + +\makeatletter +\tracingcommands=2 +\tracingmacros=2 + +\def\RcsEmptyValue{$\rm \langle Unknown \rangle$} +\RCS $Id: under_score.tex,v 1.3 2003/02/02 20:27:04 schrod Exp $ + +\begin{document} + +This is a test case for file names with underscores that once lead to +\TeX{} errors when they are part of the RCS macro expansion. + +RCS Id of Dokument is $$\hbox{\texttt{\RCSId}}$$. + +\begin{rcslog} +$Log: under_score.tex,v $ +\Revision 1.3 2003/02/02 20:27:04 schrod +Better formatting for Id field test. + +\Revision 1.2 2003/02/02 14:16:33 schrod +Handle also underscores in Log fields. + +\end{rcslog} + +\end{document} |