[comp.text.tex] changebars, RCS and tex

rodney@dali.ipl.rpi.edu (Rodney Peck II) (10/26/90)

I've looked around a bit and I haven't seen anything about this, but
it seems like it would be a really useful thing.

Here's the situation: I am working on a project with other people, and
there is a latex document that serves as the spec for the interfacing
and has things like file formats, etc.

It is tracked with RCS so we can follow the revisions and all that,
but there's a little problem.

It's hard to tell exactly what changed from revision to revision!  I
guess that this is why they invented the idea of changebars.

What would be perfect is a combination of a style file that puts the
revision of the file at the head or foot of every page, and a shell
script that would generate a latex document with changebars next to
the things that are different between the version you tell it that you
have printed out (presumably the latest one that you have read) and
the current one.  You could then latex this and print it out.

There are a few catches... lines in a latex file don't exactly
correspond to lines in the output.  So, you can't just do some sed
thing where you put a `|' in front of the lines that diff gives you.
Instead, I am thinking of something like a \changebar environment.
The diff output would be fed to perl or awk and `\begin{changebar}'
and `\end{changebar}' would be put before and after the sections that
are different.

How do I write such a beastie?  It should be robust enough to work in
nearly any environment.  For example, it should be able to put
changebars in a verbatim environment where code is being typeset.  It
also has to deal with the case where a change spans an environment
change.  Perhaps the perl/awk program would be smart enought to catch
this and stop and start the changebar on either side of the
environment change.

If you know where a latexfile to do changebars exists, or have some
idea about how to write this thing, please drop me a line.

-- 
Rodney