[comp.text.tex] change bar document style

sra@ecs.soton.ac.uk (Stephen Adams) (06/06/90)

I have been playing with David B. Johnson's change-bar
document style.  I like it.  However, it falls over if the
\chgbarbegin or \chgbarend are inside a figure or table or
maths.

I will describe how I would like it to work, but I have no
idea how to implement it.  Basically I want the change bars
to be inserted automatically.  The following shell script
inserts change bars in a file.  The two command line
arguments are the .tex file and an old `reference' .tex
file.

	#!/bin/sh
	#
	#  insertchangebars doc refdoc
	#
	
	(diff -e $2 $1 | sed '
	/^[0-9][0-9]*[ac]$/a\
	\\chgbarbegin%
	/^.$/i\
	\\chgbarend%
	' 
	echo "w $1") | ed - $2

(warning! this program alters the file so be careful if you try it)

For this to work reliably, David's macros must be changed so
that they never fall over.  It would be nice if the cange
bars could travel with the floats but I suppose that is
asking too much...

wsineel@lso.win.tue.nl (e.vriezekolk) (06/07/90)

Yes! Such an automatic changebar inclusion would be
*extremely* convenient. Couldn't someone spend an evening or
two and hack such a thing together? Please?

Eelco Vriezekolk.