Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!icdoc!sot-ecs!sra From: sra@ecs.soton.ac.uk (Stephen Adams) Newsgroups: comp.text.tex Subject: Re: change bar document style Message-ID: <2858@ecs.soton.ac.uk> Date: 5 Jun 90 21:34:00 GMT Organization: University of Southampton, UK Lines: 31 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...