[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Latex Question
Will Newton wrote:
> On Tuesday 23 Oct 2001 3:14 pm, you wrote:
>
>
>> As the 3rd line has been modified, we get a little line, * or
>> whatever next to it indicating it has changed.
>
>
> You can't diff a DVI, they're binary, so you would have to diff the source.
You can diff postscript though :-)
> Maybe you need a bit of perl that:
>
> Looks at two revisions of the source file.
> Diffs them to find the changed lines.
> If the lines contain at least some text, insert a symbol at the start of it.
> Runs latex on teh result.
That wouldn't quite work as the line breaks in the output do not match
those in the input, in general. But a chunk of modified text could be
put into a new environment that puts a bar at the side of the contents.
You'd actually need to find the smallest environment enclosing the
modified chunk that could be processed in vertical mode, or some such.
Otherwise you could have a situation like:
line1
# line1a
\begin{environment}[option1]
# \begin{environment}[option2]
line3
# line3a
line4 line4
\end{environment}
\end{environment}
where # indicates a modified source line, and this could generate
\begin{modified}
line1a
\begin{environment}[option2]
line3a
\end{modified}
line4
\end{environment}
which would cause LaTeX to choke. Instead what is needed is
\begin{modified}
line1a
\begin{environment}[option2]
line3a
line4
\end{environment}
\end{modified}
So this could be tricky, and might result in minor changes giving rise
to large chunks labelled modified...
I seem to recall seeing documents typeset in LaTeX which had
modification marks on them, and it is possible that the marks had been
automatically generated, though I doubt it. Some manual or formal
document or other. If I remember I'll let you know.
Matt.
___________________________________________________________________
Sheffield Linux User's Group - http://www.sheflug.co.uk .
To unsubscribe from this list send mail to
shef-lug-request@list.sheflug.org.uk with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.