I am collaborating on a book using bookdown and would like a simple way to track changes in the compiled version of the book (pdf or gitbook). I have used latexdiff in the past, but am not sure how to make it work w/ the default way that bookdown compiles the different chapters and then moves output to the _book directory.
On a related note, I have managed to use latexdiff from the latexdiffr R package to create a diff file for two .Rmd files (this works for specific chapters), but not for the full book. Unfortunately, I was unable to get git_latexdiff (in the same package) to work with previous commits contained on github (see error, below):
git_latexdiff("02-SettingTheStage.Rmd", "HEAD^")
fatal: Invalid object name ''HEAD^'.
Error in git_latexdiff("02-SettingTheStage.Rmd", "HEAD^") :
Could not check revision out of git.
In addition: Warning message:
In git_latexdiff("02-SettingTheStage.Rmd", "HEAD^") :
git show 'HEAD^:02-SettingTheStage.Rmd'
returned 128
I am able to open a git-bash shell and view the previous commit by typing:
git show 'HEAD^:02-SettingTheStage.Rmd'
I'm relatively new to github, bash, etc and am working on a windows 10 machine, so maybe it is something really simple I am missing. I would be happy for any suggestions using latexdiff in the latexdiffr package or otherwise. Thanks! John