[comp.text.tex] Change bars in LaTeX

jc@cvl.umd.edu (John M. Canning) (06/28/91)

   This may be a FAQ from a newcomer, but...

   I want to show the differences between two LaTeX files by drawing vertical
bars in the margin next to the lines that were altered.  I think the legal
profession calls this red lining.  Using Unix utilities I can generate a
LaTeX file with commands preceding and following the text that is to be
marked as changed.  Does anyone have a macro that can draw the vertical
bar between the first and last line spanned by the two commands?  Better yet,
is there a Unix program that could generate the LaTeX file in the way
that diffmk generates a troff file?

   What I would need would be a pair of commands, say \baron & \baroff, that
turn on and off the vertical bar.  The \baron command could just mark the
starting y position for the bar while the \baroff command would draw the bar
on the page.  I would also need a way to draw the bar across page boundaries
and perhaps change the side of the page on which the bar is drawn depending
on whether it is an odd or even page number.  One colleague suggested putting
a \marginpar{\rule{1pt}{12pt}} command at the beginning of every changed
line.  I'm worried that LaTeX "may run out of space if [I] use too many"
marginpar commands, as the LaTeX User's guide warns.  Thanks for any help.

           - John Canning (jc@cvl.umd.edu)