# Can latexdiff-cvs handle RCS tags?

I would like to know if anyone has a nice way of combining latexdiff-rcs with printing actual RCS tags in their document.

For example, I am using CVS to version control a latex document. My document page headers have the RCS tags Revision, Date and Author in the preamble of my tex document,

\usepackage{rcs}

\RCS$Revision: 1.36$ % or any RCS keyword
\RCS$Date: 2011/11/01 09:53:19$
\RCS$Author: shaun$
\date{Revision \RCSRevision, \RCSDate, \RCSAuthor}

\fancyhf{}
\pagestyle{fancy}


If I then use latexdiff-cvs with an earlier revision, latexdiff parses this into,

\RCS\DIFdelbegin \DIFdel{$Revision: 1.26$ }\DIFdelend \DIFaddbegin
\DIFadd{$Revision: 1.27$ }\DIFaddend % or any RCS keyword
\RCS\DIFdelbegin \DIFdel{$Date: 2011/03/08 08:22:24$
}\DIFdelend \DIFaddbegin \DIFadd{$Date: 2011/04/29 06:50:24$
}\DIFaddend \RCS$Author: shaun$


Which doesn't really compile the page header at all. However, if latexdiff gave me this,

\RCS$Revision: \DIFdelbegin \DIFdel{1.26}\DIFdelend \DIFaddbegin \DIFadd{1.27} \DIFaddend$ % or any RCS keyword
\RCS$date: \DIFdelbegin \DIFdel{2011/03/08 08:22:24}\DIFdelend \DIFaddbegin \DIFadd{2011/04/29 06:50:24}\DIFaddend$
\RCS$Author: shaun$


Then it compiles very nicely, and looks good.

-
Here is a question related to yours. Maybe it helps you a little: tex.stackexchange.com/questions/161/… –  Andy Nov 3 '11 at 12:01
Have a look at the rcs-multi package. It handles RCS tags. AFAIK, latexdiff has an option to ignore certain macros, which would avoid this issue. –  Martin Scharrer Nov 4 '11 at 11:17

I do not use rcs.sty exactly because of this problem. Instead I put

\date{Revision: 1.11  Date: 2009-02-26 22:25:59 }


which parses to

\DIFaddbegin \date{Revision: 1.11  Date: 2009-02-26 22:25:59 }
\DIFaddend \DIFdelbegin %DIFDELCMD < \date{Revision: 1.10  Date: 2009-02-12 18:49:04 }
%DIFDELCMD < %%%


You can do the same with your headers, I think, like this:

\documentclass{article}
\usepackage{fancyhdr,lipsum}
\def\Revision{Revision: 1.2 }