'\" t
.\"     Title: git-latexdiff
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot 
.\"      Date: 07/23/2025
.\"    Manual: \ \&
.\"    Source: \ \&
.\"  Language: English
.\"
.TH "GIT\-LATEXDIFF" "1" "07/23/2025" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-latexdiff \- Call latexdiff on two Git revisions of a file
.SH "OPTIONS"
.sp
.if n \{\
.RS 4
.\}
.nf
Usage: git latexdiff [options] OLD [NEW]
       git latexdiff [options] OLD \-\-
       git latexdiff [options] \-\- OLD
Call latexdiff on two Git revisions of a file\&.
OLD and NEW are Git revision identifiers\&. NEW defaults to HEAD\&.
If "\-\-" is used for NEW, then diff against the working directory\&.
Options:
    \-\-help                this help message
    \-\-help\-examples       show examples of usage
    \-\-main          name of the main LaTeX, R Sweave,
                            or Emacs Org mode file\&.
                            The search for the only file containing \*(Aqdocumentclass\*(Aq
                            will be attempted, if not specified\&.
                            For non\-LaTeX files, a reasonable `prepare` command
                            will be used unless explicitly provided
    \-\-no\-view             don\*(Aqt display the resulting PDF file
    \-\-latex               run latex instead of pdflatex
    \-\-xelatex             run xelatex instead of pdflatex
    \-\-lualatex            run lualatex instead of pdflatex
    \-\-tectonic            run tectonic instead of pdflatex
    \-\-bibtex, \-\-bbl       display changes in the bibliography
                             (runs bibtex to generate *\&.bbl files and
                             include them in the source file using
                             latexpand \-\-expand\-bbl before computing
                             the diff)
    \-\-biber               like \-\-bibtex, but runs biber instead\&.
    \-\-run\-bibtex, \-b      run bibtex as well as latex to generate the PDF file
                             (pdflatex,bibtex,pdflatex,pdflatex)
                          NOTE: \-\-bibtex usually works better
    \-\-run\-biber           run BibLaTex\-Biber as well as latex to generate the PDF file
                             (pdflatex,biber,pdflatex,pdflatex)
                          NOTE: \-\-biber usually works better
    \-\-view                view the resulting PDF file
                            (default if \-o is not used)
    \-\-pdf\-viewer     use  to view the PDF file (default: $PDFVIEWER)
    \-\-no\-cleanup          don\*(Aqt cleanup temp dir after running
    \-\-no\-flatten          don\*(Aqt call latexpand to flatten the document
    \-\-cleanup MODE        Cleanup temporary files according to MODE:
                           \- keeppdf (default): keep only the
                                  generated PDF file
                           \- none: keep all temporary files
                                  (may eat your diskspace)
                           \- all: erase all generated files\&.
                                  Problematic with \-\-view when the
                                  viewer is e\&.g\&. evince, and doesn\*(Aqt
                                  like when the file being viewed is
                                  deleted\&.
    \-\-latexmk             use latexmk
    \-\-build\-dir           use pdfs from specific build directory
    \-\-latexopt            pass additional options to latex (e\&.g\&. \-shell\-escape)
    \-o , \-\-output 
                          copy resulting PDF into  (usually ending with \&.pdf)
                          Implies "\-\-cleanup all"
    \-\-tmpdirprefix        where temporary directory will be created (default: /tmp)\&.
                            Relative path will use repository root as a base
    \-\-verbose, \-v         give more verbose output
    \-\-quiet               redirect output from subprocesses to log files
    \-\-prepare        run  before latexdiff (e\&.g\&. run make to generate
                             included files)
    \-\-filter         run  after latexdiff and before compilation
                             (e\&.g\&. to fix up latexdiff output)
    \-\-ln\-untracked        symlink uncommited files from the working directory
    \-\-ln\-untracked\-dir 
                          symlink subdirectory of uncommited files (relative to the main \&.tex file)
    \-\-version             show git\-latexdiff version\&.
    \-\-subtree             checkout the tree at and below the main file
                             (enabled by default, disable with \-\-whole\-tree)
    \-\-whole\-tree          checkout the whole tree (contrast with \-\-subtree)
    \-\-ignore\-latex\-errors keep on going even if latex gives errors, so long as
                          a PDF file is produced
    \-\-ignore\-makefile     ignore the Makefile, build as though it doesn\*(Aqt exist
    \-*                    other options are passed directly to latexdiff
    \-\-latexpand OPT       pass option OPT to latexpand\&. Use multiple times like
                          \-\-latexpand OPT1 \-\-latexpand OPT2 to pass multiple options\&.
    \-\-latexdiff\-flatten   use \-\-flatten from latexdiff instead of latexpand
    \-\-early\-exit\-if\-equal if two files are identical latexdiff will not be called and git\-latexdiff exits gracefully\&.
                          This option works only if latexpand is used
Unrecognized options are passed unmodified to latexdiff\&.
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLES"
.sp
Diff the previous revision with the latest commit:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff HEAD^
.fi
.if n \{\
.RE
.\}
.sp
Diff the latest commit with the working tree:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff HEAD \-\-
.fi
.if n \{\
.RE
.\}
.sp
Diff latest commit with branch master:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff master HEAD
.fi
.if n \{\
.RE
.\}
.sp
Pass \-\-type=CHANGEBAR to latexdiff to get changebars in the margins instead of red+trike/blue+underline diff:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff \-\-type=CHANGEBAR HEAD^
.fi
.if n \{\
.RE
.\}
.sp
Use a specific latexdiff configuration file:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff \-\-config /path/to/file HEAD^
.fi
.if n \{\
.RE
.\}
.sp
Add a \emakeatletter statement to hopefuly fix some LaTeX compilation errors involving commands containing an @ character:
.sp
.if n \{\
.RS 4
.\}
.nf
git latexdiff \-\-latexpand \-\-makeatletter HEAD^
.fi
.if n \{\
.RE
.\}