https://github.com/hughjonesd/latexdiffr
Diff rmarkdown or TeX files using the latexdiff utility
https://github.com/hughjonesd/latexdiffr
diff r rmarkdown tex
Last synced: 12 days ago
JSON representation
Diff rmarkdown or TeX files using the latexdiff utility
- Host: GitHub
- URL: https://github.com/hughjonesd/latexdiffr
- Owner: hughjonesd
- License: other
- Created: 2018-10-25T23:33:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T19:02:27.000Z (about 1 year ago)
- Last Synced: 2025-03-28T19:13:22.023Z (30 days ago)
- Topics: diff, r, rmarkdown, tex
- Language: R
- Homepage:
- Size: 337 KB
- Stars: 44
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
# latexdiffr
[](https://CRAN.R-project.org/package=latexdiffr)
[](https://github.com/hughjonesd/latexdiffr/actions)
[](https://app.codecov.io/github/hughjonesd/latexdiffr?branch=master)
latexdiffr is a small library that uses the `latexdiff` command
to create a diff of two Rmarkdown, .Rnw or TeX files.## Installation
``` r
remotes::install_github("hughjonesd/latexdiffr")
```You will also need `latexdiff` installed on your system:
``` bash
# on MacOS:
brew install latexdiff# on Linux:
sudo apt install latexdiff# with tinytex
Rscript -e "tinytex::tlmgr_install('latexdiff')"
```## Example
``` r
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:
```r
# 3 revisions ago:
git_latexdiff("my-file.Rmd", "HEAD~3")
```