## 默认latex diff
```bash
latexdiff input1.tex input2.tex > output.tex
```
## git-latexdiff
## 安装
```bash
git clone https://gitlab.com/git-latexdiff/git-latexdiff.git
make install
brew install a2x
brew cast
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
export PATH=/Users/caiwch/Documents/Useful/git-latexdiff:/Users/caiwch/Anaconda/bin:$PATH
```
## 使用
* 标准用法: 比较当前版本和历史版本
```bash
git latexdiff HEAD~1 --main stats_taslp.tex
```
* 比较工作区和仓库版本
```bash
git latexdiff HEAD -- --main stats_taslp.tex
```
* 指定输出文件
```bash
git latexdiff HEAD -- --main stats_taslp.tex --output diff.pdf
```
Suppose you want to compare the current commit to the version two commits back. You then use:
```bash
git latexdiff HEAD~2
```
rather than HEAD~1. If you want to compare to the N commits back, then use HEAD~N:
```bash
git latexdiff HEAD~N
```