Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!umich!umeecs!msi.umn.edu!cs.umn.edu!uc!shamash!timbuk!hrp From: hrp@cray.com (Hal Peterson) Newsgroups: comp.text.tex Subject: Re: Integrating RCS and LaTeX Message-ID: Date: 18 Apr 91 22:32:44 GMT References: <1991Apr17.205440.23660@arc.ab.ca> Organization: Cray Research, Inc. Lines: 37 In-reply-to: jbtubman@arc.ab.ca's message of 17 Apr 91 20:54:40 GMT Between the lines of equal signs is some code from the preamble of one of my documents. It would be much simpler if I weren't fussy about the format of the date. ================================================================= \makeatletter {\catcode`\$=12 % Define a LaTeX macro from an RCS keyword. \def\@RCS@define$#1: #2 ${\expandafter\gdef\csname RCS#1\endcsname{#2}} \@RCS@define$Revision$ % RCSDate is a special case because the default format---yy/mm/dd---is % too ugly for human consumption. \def\@RCS@date$#1: #2/#3/#4 #5${\gdef\RCSDate{% \@tempcnta#3\@tempcntb#2\relax #4\space \ifcase\@tempcnta\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\ifnum\@tempcntb < 100 19\fi#2% } } \@RCS@date$Date$ } \def\today{\RCSDate} \makeatother ================================================================= Unfortunately, there's no way to put it in a .sty file, because then the RCS information would apply to the .sty file rather than to the .tex file. -- Hal Peterson Internet: hrp@cray.com Cray Research, Inc. Telephone: +1 612 683 5440 Laws create nature. -Andrea Dworkin