Learn R Programming

latexdiffr

latexdiffr is a small library that uses the latexdiff command to create a diff of two Rmarkdown, .Rnw or TeX files.

Installation

remotes::install_github("hughjonesd/latexdiffr")

You will also need latexdiff installed on your system:

# on MacOS:
brew install latexdiff

# on Linux:
sudo apt install latexdiff 

# with tinytex
Rscript -e "tinytex::tlmgr_install('latexdiff')"

Example

library(latexdiffr)
# tinytex::tlmgr_path("add")
latexdiff("file1.Rmd", "file2.Rmd")

This produces output like:

git_latexdiff() allows you to compare different revisions of a file in git:

# 3 revisions ago:
git_latexdiff("my-file.Rmd", "HEAD~3") 

Copy Link

Version

Install

install.packages('latexdiffr')

Monthly Downloads

299

Version

0.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

David Hugh-Jones

Last Published

February 16th, 2024

Functions in latexdiffr (0.2.0)

git_latexdiff

Call latexdiff on git revisions
latexdiff

Produce a diff of two files using latexdiff