diff for (text only) manuscripts

Jon Slavin jslavin at cfa.harvard.edu
Mon Mar 3 15:10:38 EST 2003


This is not Python specific, but it seems that Python offers hope for
a solution.

I've been looking for a form of diff that is good for manuscipts --
rather than programs.  That is, a diff that is word as opposed to line
oriented.  My motivation is that, as a scientist I often collaborate
with others on papers wherein we take turns editing a LaTeX file. 
Sometimes I'd like to know exactly how the file has been changed but I
don't care if the lines wrap at a different point -- so I don't want
to see noted as changed an entire paragraph if a couple words in the
beginning have been added and the line breaks re-done.

I have a little experience with Python and tried altering ndiff.py (in
Python 2.1 Tools/scripts) but without too much luck.  The problem is
that even if you make it do a diff on a series of words rather than
lines, it's not clear how to put it all back together to make the
result readable.

Any suggestions welcome.

Jon Slavin




More information about the Python-list mailing list