diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-03 22:48:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-03 22:48:37 +0000 |
commit | b81a000817f03ec100d16e1add30e3ba656cd480 (patch) | |
tree | 289171416a512f89bf388d5b813be18ea36b94e9 /Master/texmf-dist/source | |
parent | 9aeba43521a044348ddebc4a5955fd72414e7995 (diff) |
rcs-multi (3apr11)
git-svn-id: svn://tug.org/texlive/trunk@21939 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/rcs-multi/Makefile | 118 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/rcs-multi/example.tex | 162 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/rcs-multi/rcs-multi.dtx | 330 |
3 files changed, 291 insertions, 319 deletions
diff --git a/Master/texmf-dist/source/latex/rcs-multi/Makefile b/Master/texmf-dist/source/latex/rcs-multi/Makefile index 90179e6dd00..6bb293819d8 100644 --- a/Master/texmf-dist/source/latex/rcs-multi/Makefile +++ b/Master/texmf-dist/source/latex/rcs-multi/Makefile @@ -1,87 +1,96 @@ -# $Id: Makefile 628 2007-07-10 20:32:06Z martin $ +# $Id: Makefile 1452 2009-10-20 14:53:34Z martin $ + +PACKAGE = rcs-multi +PACKAGE_STY = ${PACKAGE}.sty +PACKAGE_DTX = ${PACKAGE}.dtx +PACKAGE_SCR = +PACKAGE_DOC = $(PACKAGE_DTX:.dtx=.pdf) example.pdf +PACKAGE_SRC = ${PACKAGE_DTX} ${PACKAGE}.ins Makefile example.tex +PACKFILES = ${PACKAGE_SRC} ${PACKAGE_DOC} README + +TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svn *.svx *.svt *.toc *.ilg *.gls *.hd *.fdb_latexmk +INSGENERATED = ${PACKAGE_STY} +GENERATED = ${INSGENERATED} ${PACKAGE}.pdf ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf +ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip +TDSZIPFILE = ${PACKAGE}-${ZIPVERSION}.tds.zip -PACKAGE=rcs-multi -PACKFILES = ${PACKAGE}.dtx ${PACKAGE}.ins ${PACKAGE}.pdf example.tex \ - example.pdf Makefile README -TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svt *.toc *.ilg *.gls *.hd TESTDIR = tests TESTS = $(patsubst %.tex,%,$(subst ${TESTDIR}/,,$(wildcard ${TESTDIR}/test?.tex ${TESTDIR}/test??.tex))) # look for all test*.tex file names and remove the '.tex' TESTARGS = -output-directory ${TESTDIR} -INSGENERATED = ${PACKAGE}.sty -GENERATED = ${INSGENERATED} ${PACKAGE}.pdf example.pdf ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf -ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip LATEX_OPTIONS = -interaction=batchmode LATEX = pdflatex ${LATEX_OPTIONS} +TEXMFDIR = ${HOME}/texmf + RED = \033[01;31m GREEN = \033[01;32m WHITE = \033[00m -.PHONY: all doc package clean fullclean example testclean ${TESTS} +CP = cp -v +MV = mv -v +RMDIR = rm -rf +MKDIR = mkdir -p + +.PHONY: all doc package clean fullclean example testclean ${TESTS} tds ${CHECK_LOG} + +############################################################################### all: package doc example new: fullclean all -doc: ${PACKAGE}.pdf +doc: ${PACKAGE_DOC} -package: ${PACKAGE}.sty +package: ${PACKAGE_STY} ${PACKAGE_SCR} %.pdf: %.dtx ${LATEX} $*.dtx - ${LATEX} $*.dtx -makeindex -s gind.ist -o $*.ind $*.idx -makeindex -s gglo.ist -o $*.gls $*.glo ${LATEX} $*.dtx ${LATEX} $*.dtx -%.pdf: %.eps - epstopdf $< - -%.eps: %.dia - dia -t eps -e $@ $< - -${PACKAGE}.pdf: +${PACKAGE}.pdf: ${PACKAGE}.sty -${INSGENERATED}: *.dtx ${PACKAGE}.ins +${INSGENERATED}: ${PACKAGE_DTX} ${PACKAGE}.ins yes | latex ${PACKAGE}.ins clean: rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) -fullclean: - rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) ${GENERATED} *~ *.backup +fullclean: clean + rm -f ${GENERATED} *~ *.backup + rm -f ${PACKAGE}*.zip + rm -rf tds/ -example: example.pdf -example.pdf: example.tex ${PACKAGE}.sty - ${RM} example_chap*.tex - ${LATEX} $< - ${LATEX} $< +zip: ${PACKFILES} + @${MAKE} --no-print-directory ${ZIPFILE} -zip: fullclean package doc example tests ${ZIPFILE} -${PACKAGE}.zip: zip +zip: ZIPVERSION=$(shell grep "Package: ${PACKAGE} " ${PACKAGE}.log | \ + sed -e "s/.*Package: ${PACKAGE} ....\/..\/..\s\+\(v\S\+\).*/\1/") -zip: ZIPVERSION=$(shell grep '\\def\\fileversion{.*}' ${PACKAGE}.dtx | sed -e 's/\\def\\fileversion{\(.*\)}/\1/' -e 's/\s\+//g') +tdszip: ZIPVERSION=$(shell grep "Package: ${PACKAGE} " ${PACKAGE}.log | \ + sed -e "s/.*Package: ${PACKAGE} ....\/..\/..\s\+\(v\S\+\).*/\1/") -${ZIPFILE}: ${PACKFILES} - grep -q '\* Checksum passed \*' ${PACKAGE}.log +${PACKAGE}%.zip: ${PACKFILES} + @test -n "${IGNORE_CHECKSUM}" || grep -L '\* Checksum passed \*' ${PACKAGE_DTX:.dtx=.log} | wc -l | grep -q '^0$$' -pdfopt ${PACKAGE}.pdf opt_${PACKAGE}.pdf && mv opt_${PACKAGE}.pdf ${PACKAGE}.pdf - zip ${ZIPFILE} ${PACKFILES} + ${RM} $@ + zip $@ ${PACKFILES} @echo - @echo "ZIP file ${ZIPFILE} created!" + @echo "ZIP file $@ created!" -tar.gz: ${PACKAGE}.tar.gz +release: fullclean package doc example tests zip -${PACKAGE}.tar.gz: - tar -czf $@ ${PACKFILES} +############################################################################### # Make sure TeX finds the input files in TESTDIR tests ${TESTS}: export TEXINPUTS:=${TEXINPUTS}:${TESTDIR} tests ${TESTS}: LATEX_OPTIONS= testclean: - @${RM} $(foreach ext, aux log out pdf, tests/test*.${ext}) + @${RM} $(foreach ext, aux log out pdf svn svx, tests/test*.${ext}) tests: package testclean @echo "Running tests: ${TESTS}:" @@ -96,4 +105,37 @@ ${TESTS}: % : ${TESTDIR}/%.tex package testclean then /bin/echo -e "${GREEN}$@ succeeded${WHITE}" >&2; \ else /bin/echo -e "${RED}$@ failed!!!!!!${WHITE}" >&2; fi +############################################################################### + +tds: .tds + +.tds: ${PACKAGE_STY} ${PACKAGE_DOC} ${PACKAGE_SRC} + @grep -q '\* Checksum passed \*' ${PACKAGE}.log + ${RMDIR} tds + ${MKDIR} tds/ + ${MKDIR} tds/tex/ tds/tex/latex/ tds/tex/latex/${PACKAGE}/ + ${MKDIR} tds/doc/ tds/doc/latex/ tds/doc/latex/${PACKAGE}/ + ${MKDIR} tds/source/ tds/source/latex/ tds/source/latex/${PACKAGE}/ + -test -n "${PACKAGE_SCR}" && ${MKDIR} tds/scripts/ tds/scripts/${PACKAGE}/ + ${CP} ${PACKAGE_STY} tds/tex/latex/${PACKAGE}/ + ${CP} ${PACKAGE_DOC} tds/doc/latex/${PACKAGE}/ + -${CP} ${PACKAGE_SRC} tds/source/latex/${PACKAGE}/ + -test -n "${PACKAGE_SCR}" && ${CP} ${PACKAGE_SCR} tds/scripts/${PACKAGE}/ + @touch $@ + +tdszip: ${TDSZIPFILE} + +${TDSZIPFILE}: .tds + ${RM} ${TDSZIPFILE} + cd tds && zip -r ../${TDSZIPFILE} . + +############################################################################### + +install: .tds + test -d "${TEXMFDIR}" && ${CP} -a tds/* "${TEXMFDIR}/" && texhash ${TEXMFDIR} + +uninstall: + test -d "${TEXMFDIR}" && ${RM} -rv "${TEXMFDIR}/tex/latex/${PACKAGE}" \ + "${TEXMFDIR}/doc/latex/${PACKAGE}" "${TEXMFDIR}/source/latex/${PACKAGE}" \ + "${TEXMFDIR}/scripts/${PACKAGE}" && texhash ${TEXMFDIR} diff --git a/Master/texmf-dist/source/latex/rcs-multi/example.tex b/Master/texmf-dist/source/latex/rcs-multi/example.tex new file mode 100644 index 00000000000..827d7949b4a --- /dev/null +++ b/Master/texmf-dist/source/latex/rcs-multi/example.tex @@ -0,0 +1,162 @@ +\documentclass[12pt]{report} +\usepackage{rcs-multi} +% Version control information: +\rcsid{$Id: example.tex,v 1.2 2009/03/23 19:07:46 martin Exp martin $} +% or, alternatively, with full path: +\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example.tex,v 1.2 2009/03/23 19:07:46 martin Exp martin $} + +% Other keywords can be read using: +\rcskwsave{$Author: martin $} +\rcskwsave{$Date: 2009/03/23 19:07:46 $} +\rcskwsave{$Name: $} +% The `Log' keyword is not supported. +\rcskwsave{$Locker: martin $} +\rcskwsave{$RCSfile: example.tex,v $} +\rcskwsave{$Revision: 1.2 $} +\rcskwsave{$Source: /home/martin/src/latex/rcs-multi/dev/example.tex,v $} +\rcskwsave{$State: Exp $} +% Their values can be typeset using \rcskw{Author}, \rcskw{Date}, etc. + +\usepackage{hyperref} +%\usepackage{url} + +\usepackage{fancyhdr} +\renewcommand{\headrulewidth}{0.4pt} +\renewcommand{\footrulewidth}{0.4pt} +\setlength{\headheight}{14.5pt} +% This will display the last changed date and revision of the current chapter. +% Change to `\rcsdate -- \rcsrev' if you like to have the document revision. +\newcommand{\rcsfooter}{Last Changed: \rcsfiledate -- r\rcsfilerev} + +\pdfinfo{% + /CreationDate (D:\rcspdfdate) +} + +\rcsRegisterAuthor{johnd}{John Doe} +\rcsRegisterAuthor{maryd}{Mary Doe} +\rcsRegisterAuthor{martin}{Martin S.} +\rcsRegisterRevision{1.2}{Version~1} + + +%% The two 'filecontents' environments are used to produce two example chapters. +%% Normally they are separated files from the beginning but they are packed into +%% this main file to only have one example TeX file in the CTAN ZIP file. +\begin{filecontents}{example_chap1.tex} +% Version control information: +\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example_chap1.tex,v 1.3 2009/03/23 19:20:18 martin Exp $} + +\chapter{Example Chapter 1} + +\section*{Version} +\subsection*{This chapter} +% \url is needed because there is an underscore in the name +% The package 'underscore' seems not to work properly, so the 'hyperref' +% package is used which is not the best solution. Avoid underscore in LaTeX filenames. +Filename: \rcsnolinkurl{\rcsfilename}\\* +URL: \url{\rcsfileurl}\\* +% Something like \href{\rcskw{HeadURL}}{Download} works also! +\textbf{Last change}\\* +Revision: \rcsfilerev\\* +Date: \rcsfiledate\\* +Year: \rcsfileyear\\* +Time: \rcsfilehour:\rcsfileminute:\rcsfilesecond\\* +Author: \rcsfileauthor\\* + +\enlargethispage{\baselineskip} +\subsection*{Whole document} +Main Filename: \rcsnolinkurl{\rcsmainfilename}\\* +Main URL: \url{\rcsmainurl}\\* +\textbf{Last change}\\* +Filename: \rcsnolinkurl{\rcsname}\\* +URL: \url{\rcsurl}\\* +Revision: \rcsrev\\* +Date: \rcsdate\\* +Year: \rcsyear\\* +Time: \rcshour:\rcsminute:\rcssecond\\* +Author: \rcsauthor\\* +% [...] + +\section{Tests} +\rcsRegisterRevision{2.1}{Test} + +Registered author name: \rcsFullAuthor{\rcsfileauthor}\\* +Registered revision name: \rcsFullRevision{\rcsfilerev}\\* +Registered author name (*): \rcsFullAuthor*{\rcsfileauthor}\\* +Registered revision name (*): \rcsFullRevision*{\rcsfilerev}\\* + +\subsubsection*{Behaviour if value is not registered:} +Not registered user name: \rcsFullAuthor{someusername}\\* +Not registered revision name: \rcsFullRevision{1.4}\\* +Not registered user name (*): \rcsFullAuthor*{someusername}\\* +Not registered revision name (*): \rcsFullRevision*{1.4}\\* + + +\end{filecontents} + +\begin{filecontents}{example_chap2.tex} +% Version control information: +\rcsid{$Header: /home/martin/src/latex/rcs-multi/dev/example_chap2.tex,v 1.2 2009/03/23 19:10:56 martin Exp martin $} + +\chapter{Example Chapter 2} + +\section*{Version} +\subsection*{This chapter} +% \url is needed because there is an underscore in the name +% The package 'underscore' seems not to work properly, so the 'hyperref' +% package is used which is not the best solution. Avoid underscore in LaTeX filenames. +Filename: \rcsnolinkurl{\rcsfilename}\\ +URL: \url{\rcsfileurl}\\ +% Something like \href{\rcskw{HeadURL}}{Download} works also! +\textbf{Last change}\\ +Revision: \rcsfilerev\\ +Date: \rcsfiledate\\ +Year: \rcsfileyear\\ +Time: \rcsfilehour:\rcsfileminute:\rcsfilesecond\\ +Author: \rcsfileauthor\\ + +\enlargethispage{\baselineskip} +\subsection*{Whole document} +Main Filename: \rcsnolinkurl{\rcsmainfilename}\\ +Main URL: \url{\rcsmainurl}\\ +\textbf{Last change}\\ +Filename: \rcsnolinkurl{\rcsname}\\ +URL: \url{\rcsurl}\\ +Revision: \rcsrev\\ +Date: \rcsdate\\ +Year: \rcsyear\\ +Time: \rcshour:\rcsminute:\rcssecond\\ +Author: \rcsauthor +\end{filecontents} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\listfiles +\begin{document} + +\begin{titlepage} + \hbox{} + \pdfbookmark{Title Page}{titlepage} + \vspace{8ex} + {\huge Title\par} + \vspace{2ex} + {\large \noindent This is an example document for the \texttt{rcs-multi} + package. Please also look at the LaTeX source code of this + document.} + \vfill + \flushleft\sffamily + Version control information:\\ + Head Filename: \rcsnolinkurl{\rcsmainfilename}\\ + Head URL: \rcsnolinkurl{\rcsmainfileurl}\\ + Last changed file (name): \rcsnolinkurl{\rcsname}\\ + Last changed file (URL): \rcsnolinkurl{\rcsurl}\\ + Last changed date: \rcsdate\\ + Last changes revision: \rcsrev\\ + Version: \rcsFullRevision*{\rcsrev}\\ + Last changed by: \rcsFullAuthor*{\rcsauthor}\\ +\end{titlepage} + +% Include chapters +\include{example_chap1} +\include{example_chap2} +%\include{example_chap3} + +\end{document} diff --git a/Master/texmf-dist/source/latex/rcs-multi/rcs-multi.dtx b/Master/texmf-dist/source/latex/rcs-multi/rcs-multi.dtx index 1fb8f988255..51f709710f1 100644 --- a/Master/texmf-dist/source/latex/rcs-multi/rcs-multi.dtx +++ b/Master/texmf-dist/source/latex/rcs-multi/rcs-multi.dtx @@ -17,243 +17,33 @@ % % This work consists of the file rcs-multi.dtx and the derived file % rcs-multi.sty. -% $Id: rcs-multi.dtx 638 2009-03-23 19:21:36Z martin $ +% $Id: rcs-multi.dtx 2436 2011-04-02 19:11:17Z martin $ % \fi % \iffalse %<*package|driver|wrapper> \def\filedate$#1: #2 #3 #4-#5-#6 #7 ${% - \year#4\month#5\day#6\relax \def\filedate{#4/#5/#6}% \def\filerev{#3}% } -\filedate$Id: rcs-multi.dtx 638 2009-03-23 19:21:36Z martin $ -\def\fileversion{v0.1} +\filedate$Id: rcs-multi.dtx 2436 2011-04-02 19:11:17Z martin $ +\def\fileversion{v0.1a} %</package|driver|wrapper> %<*driver> \ProvidesFile{rcs-multi.dtx} [\filedate\space\fileversion\space RCS Keywords for multi-file LaTeX documents] -\documentclass{ltxdoc} +\documentclass{ydoc} \usepackage{rcs-multi} -\usepackage{booktabs} -\usepackage{ifpdf} -\ifpdf - % use hypdoc if you have it, hyperref else - \IfFileExists{hypdoc.sty} - {\usepackage{hypdoc}} - {\usepackage{hyperref}} -\else - \let\url\texttt -\fi \usepackage{xspace} \newcommand{\ie}{i.e.\@\xspace} \newcommand{\eg}{e.g.\@\xspace} -\iffalse -\let\css=\cs -\let\op=\cs -\let\DescribeOption\DescribeMacro -\let\DescribeScript\DescribeOption -\else % crossreference of macros in documentation -\makeatletter +\def\karg#1{\texttt{\$#1\$}} +\def\kmarg#1{\texttt{\$}\meta{#1}\texttt{\$}} +\def\rcsmulti{\pkg{rcsmulti}\xspace} -\usepackage{xspace} -\@namedef{seen@package@latex}{1} %^^A avoid footnotes for 'latex' -\newcommand*{\pkg}[1]{% - \href{http://tug.ctan.org/pkg/#1}{\texttt{#1}}% - % URL footnote (for print-out) on first appearance: - \@ifundefined{seen@package@#1}{% - \footnote{CTAN: \url{http://tug.ctan.org/pkg/#1}}% - \@namedef{seen@package@#1}{1}% - }{}% - \xspace -} -\newcommand*{\rcsmulti}{% - \texttt{rcs-multi}\xspace% -} - -% link \cs to macro definitions -\let\origmacro\macro -\let\origendmacro\endmacro -\let\origStopEventually\StopEventually -\let\origPrintDescribeMacro\PrintDescribeMacro -\usepackage{xcolor} -\definecolor{darkred}{rgb}{0.333.0.0,0.0} -\hypersetup{colorlinks=true,linkcolor=darkred,urlcolor=darkred} -\definecolor{macrodesccolor}{rgb}{0.0,0.0,0.8} -\definecolor{macroimplcolor}{rgb}{0.0,0.0,0.4} -\definecolor{metacolor}{rgb}{0.0,0.4,0.4} -\definecolor{scriptcolor}{rgb}{0.2,0.6,0.2} -\definecolor{optioncolor}{rgb}{0.3.0.2,0} - -\let\macroline\\ -\newlength{\macrosep} -\setlength{\macrosep}{-3em} -\renewcommand{\meta@font@select}{\color{metacolor}\itshape} -\newcommand{\macroformat}[1]{\textbf{\ttfamily #1}} -\newcommand{\optionformat}[1]{\textbf{\sffamily #1}} -\newcommand{\scriptformat}[1]{\textbf{\ttfamily #1}} -\newcommand{\macroargformat}[1]{\texttt{#1}} -\newcommand{\scriptargformat}[1]{\textbf{#1}} -\newcommand{\macrohlinkprefix}{desc} -\newcommand{\macrolink}{} - -\usepackage[T1]{fontenc} -\usepackage{lmodern} - -\def\DescribeMacro{\@ifnextchar*{\DescribeMacroS}{\DescribeMacroN}} -\def\DescribeMacroN{% - \bigskip\pagebreak[3]\par\noindent\DescribeMacroS*% -} -\def\DescribeMacroS*#1#2{% - \begingroup - \g@namedef{href@desc@#1}{}% - \immediate\write\@mainaux{% - \noexpand\g@namedef{href@desc@#1}{}% - }% - \@ifundefined{href@impl@#1}% - {\let\macrolink\relax}% - {\def\macrolink{\hyperlink{impl@#1}}}% - \hypersetup{linkcolor=macrodesccolor}% - \hspace*{\macrosep}% - \raisebox{\baselineskip}[\baselineskip]{\hypertarget{desc@#1}{}}% - \macrolink{\macroformat{\textcolor{macrodesccolor}{\textbackslash #1}}}% - \noindent\mbox{}\macroargformat{#2}\nopagebreak - \macroline*[0.2\baselineskip]% - \endgroup - \nopagebreak - \ignorespaces -} -\def\DescribeScript{\@ifnextchar*{\DescribeScriptS}{\DescribeScriptN}} -\def\DescribeScriptN{% - \bigskip\par\pagebreak[2]\noindent\DescribeScriptS*% -} -\def\DescribeScriptS*#1#2{% - \hspace*{\macrosep}% - \raisebox{\baselineskip}[\baselineskip]{\hypertarget{script@#1}{}}% - \scriptformat{\textcolor{scriptcolor}{#1}}% - \noindent\mbox{}\scriptargformat{\ {#2}}\macroline*[0.2\baselineskip]% - \nopagebreak -} -\def\DescribeOption{\@ifnextchar*{\DescribeOptionS}{\DescribeOptionN}} -\def\DescribeOptionN{% - \bigskip\par\noindent\DescribeOptionS*% -} -\def\DescribeOptionS*#1{% - \hspace*{\macrosep}% - \raisebox{\baselineskip}[\baselineskip]{\hypertarget{option@#1}{}}% - \optionformat{\textcolor{optioncolor}{#1}}% - \noindent\mbox{}\macroline*[0.2\baselineskip]% - \nopagebreak -} -\newcounter{macrolevel} -\renewenvironment{macro}[1]{% - \addtocounter{macrolevel}{1}% - \expandafter\macroX\expandafter{\expandafter\@gobble\string#1}% -}{% - \addtocounter{macrolevel}{-1}% -} -\providecommand*{\g@namedef}[1]{% - \expandafter\gdef\csname #1\endcsname -} -\newcommand*{\macroX}[1]{% - \ifnum\c@macrolevel<2 - \smallskip - \fi - \par\noindent - \g@namedef{href@impl@#1}{}% - \immediate\write\@mainaux{% - \noexpand\g@namedef{href@impl@#1}{}% - }% - \@ifundefined{href@desc@#1}% - {\let\macrolink\relax}% - {\def\macrolink{\hyperlink{desc@#1}}}% - \hspace*{\macrosep}% - \raisebox{\baselineskip}[\baselineskip]{\hypertarget{impl@#1}{}}% - \macrolink{\macroformat{% - \textcolor{macroimplcolor}{\textbackslash #1}}}% - \\*[\smallskipamount]% - \@ifnextchar\begin{\vspace*{-\baselineskip}}{\imacroarg}% -} - -\newcounter{macroargs} -\newcounter{nmacroarg} - -\newcommand*{\imacroarg}[1][0]{% - \setcounter{macroargs}{#1}% - \setcounter{nmacroarg}{1}% - \ifnum\c@macroargs>0 - \expandafter\imacroargX - \fi -} -\newcommand*{\aftermacroargs}{% - \@ifnextchar\begin - {\\*[-2ex]\ignorespaces}% - {\\*[\smallskipamount]\ignorespaces}% -} -\newcommand*{\imacroargX}[1]{% - \hspace*{-1em}\texttt{\#\thenmacroarg:} #1\relax - \ifnum\c@macroargs>1 - \newline - \fi - \addtocounter{nmacroarg}{1}% - \addtocounter{macroargs}{-1}% - \ifnum\c@macroargs>0 - \expandafter\imacroargX - \else - \expandafter\aftermacroargs - \fi -} - - -\def\karg#1{\{\$\textcolor{metacolor}{#1}\$\}} -\def\kmarg#1{\{\$\meta{#1}\$\}} - -\DeclareRobustCommand{\csi}[1]{% - \begingroup - \hypersetup{linkcolor=macroimplcolor}% - \renewcommand{\macrohlinkprefix}{impl}% - \@ifundefined{href@impl@#1}% - {\let\macrolink\relax}% - {\def\macrolink{\hyperlink{impl@#1}}}% - \csX{#1}% - \endgroup -} -\DeclareRobustCommand{\csd}[1]{% - \begingroup - \hypersetup{linkcolor=macrodesccolor}% - \renewcommand{\macrohlinkprefix}{macro}% - \@ifundefined{href@desc@#1}% - {\let\macrolink\relax}% - {\def\macrolink{\hyperlink{desc@#1}}}% - \csX{#1}% - \endgroup -} -\DeclareRobustCommand{\csX}[1]{% - \begingroup - \macrolink{\texttt{\textbackslash#1}}% - \endgroup -} -\let\cs\csd -\DeclareRobustCommand{\css}[1]{\texttt{\textbackslash#1}} -\DeclareRobustCommand{\op}[1]{% - \begingroup - \hypersetup{linkcolor=optioncolor}% - \hyperlink{option@#1}{\textbf{\sffamily #1}}% - \endgroup -} -\DeclareRobustCommand{\scr}[1]{% - \begingroup - \hypersetup{linkcolor=scriptcolor}% - \hyperlink{script@#1}{\scriptformat{#1}}% - \endgroup -} - -\def\StopEventually#1{\origStopEventually{#1}% -\let\cs\csi -} - -\fi +\let\csi\cs +\def\cs#1{\Macro{#1}\relax} \usepackage{graphicx} @@ -263,8 +53,6 @@ %\PageIndex \RecordChanges %\OnlyDescription -\widowpenalty=500 -\clubpenalty=500 \begin{document} \DocInput{rcs-multi.dtx}% \PrintChanges @@ -325,23 +113,8 @@ % \DoNotIndex{\ProcessKeyvalOptions,\SetupKeyvalOptions} % \DoNotIndex{\@firstoftwo,\@secondoftwo,\@gobble} % -% \title{The \textsf{rcs-multi} package} -% \author{Martin Scharrer \\ \url{martin@scharrer-online.de} \\ -% \url{http://www.scharrer-online.de/latex/rcs-multi}\\ -% CTAN: \url{http://tug.ctan.org/pkg/rcs-multi}} -% \date{Version \expandafter\@gobble\fileversion\\[0.5ex]\today} -% -% \ifpdf -% \hypersetup{% -% pdfauthor = {Martin Scharrer <martin@scharrer-online.de>}, -% pdftitle = {The rcs-multi package, \fileversion, r\filerev\ from -% \filedate}, -% pdfsubject = {Documentation of LaTeX package rcs-multi which allows the -% typesetting of RCS keywords in multi-file LaTeX documents}, -% pdfkeywords = {rcs-multi, LaTeX, RCS, multiple files, keywords, Version -% Control, Id} -% }% -% \fi +% \author{Martin Scharrer} +% \email{martin@scharrer-online.de} % \maketitle % % \section{Introduction} @@ -390,7 +163,7 @@ % See section~\ref{sec:kwaccess} to learn how to typeset the keyword values. % % \DescribeMacro{rcsid}{\karg{Id}} -% \DescribeMacro*{rcsid}{\karg{Header}} +% \DescribeMacro{rcsid}{\karg{Header}} % The macro is for the |Id| keyword and must be written like shown. A trailing % colon with or without spaces after the keyword name (`|Id|') is also valid but % \textbf{everything else} except a valid RCS string will cause a \TeX{} parse @@ -417,17 +190,17 @@ % teletype font (|\texttt|) or use |{\urlstyle{rm}\rcsnolinkurl{...}}| which % requires the \pkg{hyperref} package. % -% \DescribeMacro{rcsrev}{} -% \DescribeMacro*{rcsdate}{} -% \DescribeMacro*{rcsauthor}{} +% \DescribeMacro{rcsrev} +% \DescribeMacro{rcsdate} +% \DescribeMacro{rcsauthor} % These macros hold the keyword values of the whole document, \ie of the most % recent revision. They can be used everywhere in every file of the \LaTeX{} % document, after |\usepackage{rcs-multi}| of course. Please see % section~\ref{sec:date} how to typeset parts of the date. % -% \DescribeMacro{rcsfilerev}{} -% \DescribeMacro*{rcsfiledate}{} -% \DescribeMacro*{rcsfileauthor}{} +% \DescribeMacro{rcsfilerev} +% \DescribeMacro{rcsfiledate} +% \DescribeMacro{rcsfileauthor} % These macros hold the keyword values of the current \LaTeX{} file, but only if % it contains a \cs{rcsid} or \cs{rcsidlong} macro. Otherwise the macros hold % either zero values or the values of the last file dependent on whether an @@ -435,14 +208,14 @@ % section~\ref{sec:date} how to typeset parts of the date. See \cs{rcskw} below % for all other keywords. % -% \DescribeMacro{rcsmainfilename}{} +% \DescribeMacro{rcsmainfilename} % The macro \cs{rcsmainfilename} hold the filename of the main \LaTeX{file}. % It can be used to typeset this information anywhere in the document which % might be more descriptive as the name of the current file (which can be % typeset with \cs{rcskw}|{HeadURL}| or \cs{rcskw}|{Filename}| after \cs{rcsid} % or \cs{rcsidlong}, respectively). ^^A TODO: Change to correct names! % -% \DescribeMacro{rcssetmainfile}{} +% \DescribeMacro{rcssetmainfile} % This will declare the current file as the main LaTeX file by defining the % above macros. It will automatically be called at the end of the preamble so % the user normally doesn't have to use it by him- or herself as long it isn't @@ -450,7 +223,7 @@ % of \cs{rcsmainfilename} directly without going over the auxiliary file. % Calling it in several files will make this two macros inconsistent. % -% \DescribeMacro{rcskw}{\marg{keyword name}} +% \DescribeMacro{rcskw}{<keyword name>} % All keywords saved with \cs{rcsid} or \cs{rcskwsave} can be typeset by this % macro which is a holdover from a very early version of this % package when multiple files where not supported. It takes one argument which @@ -469,48 +242,41 @@ % used inside |\url|. In this case the warning code will be typeset(!) verbatim % into the document by |\url|. % -% \DescribeMacro{rcskwdef}{\marg{keyword name}\marg{value}} +% \DescribeMacro{rcskwdef}{<keyword name>}{<value>} % This macro is used to define the keyword values. This is normally only called % internally but could be used by the user to override single keywords. The % values can then be typeset by \cs{rcskw}. Note that this macro has no % influence on the calculation of the latest revision. % % \subsection{Accessing Date Values}\label{sec:date} -% \begin{tabular}{@{}l@{\hspace{-2\macrosep}}ll@{}}\\ -% \DescribeMacro*{rcsyear}{}& -% \DescribeMacro*{rcsfileyear}{}\\ -% \DescribeMacro*{rcsmonth}{}& -% \DescribeMacro*{rcsfilemonth}{}\\ -% \DescribeMacro*{rcsday}{}& -% \DescribeMacro*{rcsfileday}{}\\ -% \DescribeMacro*{rcshour}{}& -% \DescribeMacro*{rcsfilehour}{}\\ -% \DescribeMacro*{rcsminute}{}& -% \DescribeMacro*{rcsfileminute}{}\\ -% \DescribeMacro*{rcssecond}{}& -% \DescribeMacro*{rcsfilesecond}{}\\ -% \end{tabular} -% \\*[\medskipamount] +% \begin{DescribeMacrosTab}{ll} +% \Macro{rcsyear} & \Macro{rcsfileyear} \\ +% \Macro{rcsmonth} & \Macro{rcsfilemonth} \\ +% \Macro{rcsday} & \Macro{rcsfileday} \\ +% \Macro{rcshour} & \Macro{rcsfilehour} \\ +% \Macro{rcsminute} & \Macro{rcsfileminute} \\ +% \Macro{rcssecond} & \Macro{rcsfilesecond} \\ +% \end{DescribeMacrosTab} % Whenever the date information is read, \ie by % \cs{rcskwsave}|{Date}| or \cs{rcsid}, the following macros are set to the % appropriate date parts for the % current file (the |\rcsfile...| versions) and for the whole document. % % -% \DescribeMacro{rcstime}{} -% \DescribeMacro*{rcsfiletime}{} +% \DescribeMacro{rcstime} +% \DescribeMacro{rcsfiletime} % This macros return the time part of the date only and simply return the % corresponding hour, minute and second macros with a colon as separator. % -% \DescribeMacro{rcspdfdate}{} +% \DescribeMacro{rcspdfdate} % Returns the last changed date of the whole document in a format needed for % |\pdfinfo|. Can be used like this:\\ % \hbox{}\hfill|\pdfinfo{ /CreationDate (D:\rcspdfdate) }|\hfill\hbox{}\\ % to set the PDF creation date to the last changed date if you use |pdflatex| to % compile your \LaTeX{} document. % -% \DescribeMacro{rcstoday}{} -% \DescribeMacro*{rcsfiletoday}{} +% \DescribeMacro{rcstoday} +% \DescribeMacro{rcsfiletoday} % These macros typeset the document-global or current-file, respectively, using % the format of |\today| which depends on the used language. % To adjust the language of your document use the \pkg{babel} package. @@ -523,18 +289,20 @@ % then you can write \eg |\rcsFullAuthor{\rcsauthor}| or % |\rcsFullAuthor{\rcsfileauthor}|. % -% \DescribeMacro{rcsRegisterAuthor}{\marg{author}\marg{full name}} +% \DescribeMacro{rcsRegisterAuthor}{<author>}{<full name>} % This macro registers \meta{full name} as full name for \meta{author} (a % RCS username) for later use with \cs{rcsFullAuthor}. % -% \DescribeMacro{rcsFullAuthor}{\marg{author name or macro}} -% \DescribeMacro*{rcsFullAuthor*}{\marg{author name or macro}} +% \DescribeMacro{rcsFullAuthor}{<author name or macror>} +% \DescribeMacro{rcsFullAuthor*}{<author name or macro>} % Takes the username as argument and returns the full name if it was registered -% first with \cs{rcsRegisterAuthor}, otherwise it returns the given username. +% first with \Macro\rcsRegisterAuthor, otherwise it returns the given username. % The star version returns the username in parentheses after the full name. -% This is normally used in one of the following forms:\\ -% \hspace*{3em}\cs{rcsFullAuthor}|{|\cs{rcsauthor}|}|\\ -% \hspace*{3em}\cs{rcsFullAuthor}|{|\cs{rcsfileauthor}|}|\\ +% This is normally used in one of the following forms: +% \begin{macroquote} +% \rcsFullAuthor{\AlsoMacro\rcsauthor} \\ +% \rcsFullAuthor{\AlsoMacro\rcsfileauthor} +% \end{macroquote} % % \subsection{Using Full Revision Names} % Like the author's also revision names/tags can be registered and used later. @@ -543,12 +311,12 @@ % correct results when you like to tag the to-be-checked-in revision. Please % note that this has nothing to do with the normal tagging. % -% \DescribeMacro{rcsRegisterRevision}{\marg{revision number}\marg{tag name}} +% \DescribeMacro{rcsRegisterRevision}{<revision number>}{<tag name>} % This registers \meta{tag name} as tag name for \meta{revision number} for % later use with \cs{rcsFullRevision}. % -% \DescribeMacro{rcsFullRevision}{\marg{revision number or macro}} -% \DescribeMacro*{rcsFullRevision*}{\marg{revision number or macro}} +% \DescribeMacro{rcsFullRevision}{<revision number or macro>} +% \DescribeMacro{rcsFullRevision*}{<revision number or macro>} % Takes a revision number coming from a macro like \cs{rcsrev}, \cs{rcsfilerev} % or a number as argument and returns the full name if it was registered first % with \cs{rcsRegisterRevision}, otherwise it returns ``Revision \meta{revision @@ -556,8 +324,7 @@ % parentheses after the tag name, \eg |Name (1.2)|. % % \subsection{Verbatim URLs with and without Hyperlinks} -% \vspace{-\baselineskip} -% \DescribeMacro{rcsnolinkurl}{\marg{macro with returns special text}} +% \DescribeMacro{rcsnolinkurl}{<macro with returns special text>} % This macro allows you to write |\rcsnolinkurl{\rcskw{HeadURL}}| and get the % Head URL typeset verbatim. However |\url{|\cs{rcskw}|{HeadURL}}| % (\pkg{hyperref} package) gives you the same result with a hyperlink. Both @@ -569,6 +336,7 @@ % % \StopEventually{} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \clearpage % \section{Implementation} % \subsection{Package Header} % \begin{macrocode} |