Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ucselx!bionet!agate!ucbvax!bloom-beacon!eru!hagbard!sunic!dkuug!diku!kris From: kris@diku.dk (Kristoffer H. Holm) Newsgroups: comp.text.tex Subject: Re: Integrating RCS and LaTeX Message-ID: <1991Apr19.225123.21491@odin.diku.dk> Date: 19 Apr 91 22:51:23 GMT References: <1991Apr17.205440.23660@arc.ab.ca> Sender: kris@rimfaxe.diku.dk Organization: Department of Computer Science, U of Copenhagen Lines: 83 Hi...here is my version of RCS control with TeX: I have the definitions below in my preamble (i.e., style) file and put \RCSrevision$Revision$ \RCSdate$Date$ \Draft in my documents; RCS expands them to something like \RCSdate$Date: 1991/04/19 03:08:51 $ \RCSrevision$Revision: 1.1 $ \Draft The good thing about these macros is that they work even before you have checked in your initial revision, and the effect goes away when you uncomment the \Draft line (indicating that you have submitted the paper or whatever). Also it includes an \ifdraft conditional that you may use in you document to uncomment things in "final" versions. NOTE: You might have \today and \eat@ predefined; also your conventions regarding the \catcode`\@ might be different (I use the conventions of plain TeX and AmS-TeX; LaTeX users should use \makeatletter and \makeatother [sic]). ====================================================================== \catcode`\@=11 %% %% REVISION CONTROL [by kris@diku.dk]. %% %% \thedate %% \therevision %% These contain the date and revision of this paper, set by the %% following revision control commands. Default to the current date and %% to nothing. %% %% \RCSdate$...$ %% \RCSrevision$...$ %% Modify the date and revision of the paper as given by the RCS %% variables Date and Revision (not inserted above because then RCS %% would interfere with this comment). Use before \Draft. %% %% \Draft %% \ifdraft...\else...\fi %% \Draft prepends ``Draft'' to \therevision and sets \drafttrue. %% \edef\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi\space\number\day, \number\year} \def\eat@#1{} %% \def\thedate{\today} \def\therevision{} %% \def\RCSdate$Date{% \def\next@{% \ifx\next$\let\nextii@=\eat@\else\let\nextii@=\RCSdate@\fi\nextii@}% \futurelet\next\next@} \def\RCSdate@: #1/#2/#3 #4 ${\xdef\thedate{% \ifcase#2\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi\space\ignorespaces#3, \ifnum#1<100\relax19\fi#1}} %% \def\RCSrevision$Revision{% \def\next@{% \ifx\next$\let\nextii@=\eat@\else\let\nextii@=\RCSrevision@\fi\nextii@}% \futurelet\next\next@} \def\RCSrevision@: #1 ${\xdef\therevision{[#1]}} %% \newif\ifdraft \def\Draft{\xdef\therevision{Draft \therevision}\drafttrue} %% \catcode`\@=\active ====================================================================== Regards, Kristoffer H{\o}gsbro Holm Computer Science Dept. (TOPPS group), University of Copenhagen Universitetsparken 1, DK-2100 Copenhagen {\O} +45 31396466 -- Kristoffer H{\o}gsbro Holm Computer Science Dept. (TOPPS group), University of Copenhagen Universitetsparken 1, DK-2100 Copenhagen {\O} +45 31396466