开发者

Paragraph-based diff program?

开发者 https://www.devze.com 2022-12-22 19:31 出处:网络
Does an开发者_运维问答yone know of a diff viewer or comparison program that can do paragraph-based differentials? My repos has a large number of LaTeX files that are formatted into 80-character wide p

Does an开发者_运维问答yone know of a diff viewer or comparison program that can do paragraph-based differentials? My repos has a large number of LaTeX files that are formatted into 80-character wide paragraphs (for easy editing with vim). It's currently very difficult to interpret the diffs between various versions, because any edit that caused the position of the line breaks to change results in a lot of spurious differences that show up in the diff.


You want wdiff.

Although I endorse breaking the line at the end of each sentence. Not only does it make it easier with source-code control, it makes it easier with co-authors as well.


I use latexdiff which works extremely well for minor edits, not so good if you have major changes.


I've always found it easier to manually line break at the end of sentences. This makes editing things easier, since if you've printed out a version of the pdf output and written on that, you can just scan the left hand side of the page for the start of the sentence you want to change.

This would also mean that any differential program would not give a ton of spurious diffs.


If you don't mind reformatting before diffing, you could reformat each paragraph into one very long line, and then use a diff tool that shows intra-line differences (in addition to line differences, which in your case would represent paragraph differences).

Alternately, with more clever reformatting, you could reformat each paragraph such that there is one sentence per line.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号