Article View: net.text
Article #901Re: Change bars in TeX (using SCCS)
From: clewis
Date: Fri, 06 Jun 1986 13:38
Date: Fri, 06 Jun 1986 13:38
68 lines
3629 bytes
3629 bytes
In article <154@grpthry.UUCP> aw@grpthry.UUCP (Alan Whitton) writes:
>*********
>
>I am looking for a solution to a rather challenging problem. I am hoping to
>use SCCS for version control of documents I am typesetting in TeX. The problem
>is, how to use SCCS version control sequences to create change bars (similar
>to those used in IBM documentation). This could be done in many ways and I
>was just wondering if anyone had any ideas (or even, hope of hopes, has
>experience doing this). Does this need to know the internal format of SCCS
>files, or could SCCS just tell where the changes are? Any help will be
>gladly appreciated.
Three approaches (I investigated this and implemented one of them recently):
1) "get -m" will emit the document with each line preceded with
an SCCS id. You can then write a filter that takes the input,
strips off this information, except for inserting the appropriate
nroff change bar commands when the SCCS id changes.
I have a filter that does this in a fancy way - you get to decide
which SCCS revisions you want to mark, and with what marks. It
also generates a ".Sr" macro (with the help of "prs" also providing
input), that when invoked will print a list of revisions, their
marks, SCCS comments, dates, and the user that did the change.
If anybody wants it, send me mail (and if sufficient interest is
shown I'll post it to net.sources)
The main difficulty with this approach is that it can *only* mark
additions. Not deletions.
2) System V (R1 I think) has a utility called "diffmk":
From the SV manual page:
diffmk name1 name2 name3
"Diffmk compares two versions of a file, and creates a third
file that includes "change mark" revisions for nroff and
troff."
You'd just have to "get" the current and previous revision and
run thru diffmk then [nt]roff.
Main difficulty is that it works only with one set of differences.
Nor can it get at any of the SCCS info (comments etc.). Though,
you could easily get prs information thru another filter and
cat the results together.
3) Read the s. file and follow the "^AI", "^AD" and "^AE" directives,
emitting mc's as you go. The internal format of SCCS isn't all
that hard to understand, particularly if you aren't interested in the
SCCS control information.
We're using the first approach because it was relatively easy, and we wanted
to be able to have more than one set of revisions marked. The 3rd is by far
the most flexible. One of these days....
Since you're using TeX, you'd have to modify the suggestions above to
work with TeX change bar mechanisms rather than [nt]roff's (".mc <mark>").
BTW: One particular annoyance with [nt]roff is that the ".mc" character can
only be one character. Grrrr. (I wanted to use the SCCS id itself!)
--
Chris Lewis,
{pyramid|watmath|utcsri|decvax|allegra|linus|ihnp4}!utzoo!
{utcsri|cbosgd}!utcs!
{yetti|lsuc|genat|mot|oakhill}!
... mnetor!clewis
BELL: (416)-475-8980 ext. 321
Technical Details
Message-ID:
<3493@mnetor.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utcs!mnetor!clewisReferences:
<154@grpthry.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!clewis From: clewis@mnetor.UUCP Newsgroups: net.text Subject: Re: Change bars in TeX (using SCCS) Message-ID: <3493@mnetor.UUCP> Date: Fri, 6-Jun-86 09:38:23 EDT Article-I.D.: mnetor.3493 Posted: Fri Jun 6 09:38:23 1986 Date-Received: Fri, 6-Jun-86 20:17:38 EDT References: <154@grpthry.UUCP> Reply-To: clewis@mnetor.UUCP (Chris Lewis) Distribution: net Organization: Computer X (CANADA) Ltd., Toronto, Ontario, Canada Lines: 68