5 ms·
An excellent tool that can be used in conjunction with this approach is the word-level diff option for git diffs: `git diff --color-words` Rather than processi
by ivan_ah 6y ago
An excellent tool that can be used in conjunction with this approach is the word-level diff option for git diffs: `git diff --color-words`
Rather than processing entire lines (useful for code), it shows individual word changes, so it's great for tracking data as in the screenshots in the article and even better for text (output produced is similar to latexdiff for those familiar).
I highly recommend... I have a git alias setup for this, and use it almost every day.
- simonw 6y agoThat's a great tip, thanks. Looks like you can use that option with 'git show' too: git show --color-words
- ivan_ah 6y agoOh cool. I just learned a new git verb today! (Previously I always used `git diff <commit-1> <commit>` but `git show <commit>` is much simpler.
- globular-toast 6y agomagit users can enable this in all diffs by setting the variable `magit-diff-refine-hunk'.
- mark_l_watson 6y agoThanks! I have written my last half dozen books using markdown + leanpub.com, keeping my book artifacts in GitHub. I am going to try this!
- KajMagnus 6y ago> [I] use it almost every day. What do you use it for? I'm wondering, what web pages / what information is so interesting, so one looks for changes almost every day :-) Is it maybe for finding out if contents linked by Minireference text books, change in significant ways? Or move to different URLs?
- ivan_ah 6y agoMostly reviews of text edits on the books. I'll make some changes for a while, then add them to git, and review the changes `git diff --color-words --cached` before I commit. Both MATH&PHYS and LA books are about to get a point-release (lots of typo fixes and improvements to certain explanations based on two years of reader feedback). Even more useful is when collaborating with others, e.g., to see what changes the editor made. When I send diffs to her, I usually run `latexdiff` (takes >1h to generate on 500 pages), but when I check her changes I just use git. Last but not least, I've been working on a French translation of the book and now I use the diffs to keep the two versions "in sync," meaning any improvements made to one edition are also made in the other. See https://minireference.com/blog/multilingual-authoring-for-the-win/ https://minireference.com/blog/multilingual-authoring-for-th... for more info about this cool hack.