Learn R Programming

latexdiffr (version 0.2.0)

git_latexdiff: Call latexdiff on git revisions

Description

git_latexdiff() checks out a previous version of a file and calls latexdiff on it.

Usage

git_latexdiff(path, revision, clean = TRUE, ...)

Value

The result of latexdiff.

Arguments

path

File path to diff

revision

Revision, specified in a form that git understands. See man gitrevisions

clean

Clean up intermediate files, including the checked out file?

...

Arguments passed to latexdiff()

Details

git_latexdiff only checks out the specific file in path. If your Rmd file depends on external resources which have also changed, you will need to checkout the old revision as a whole and create the tex file manually.

Examples

Run this code
if (FALSE) {
git_latexdiff("file1.Rmd", "HEAD^")
git_latexdiff("file1.Rmd", "master@{7 days ago}")
}

Run the code above in your browser using DataLab