Debian Codegraph @

texmf-dist/doc/man/man1/git-latexdiff.1

raw
1 '\" t
2 .\" Title: git-latexdiff
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 07/23/2025
6 .\" Manual: \ \&
7 .\" Source: \ \&
8 .\" Language: English
9 .\"
10 .TH "GIT\-LATEXDIFF" "1" "07/23/2025" "\ \&" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 git-latexdiff \- Call latexdiff on two Git revisions of a file
32 .SH "OPTIONS"
33 .sp
34 .if n \{\
35 .RS 4
36 .\}
37 .nf
38 Usage: git latexdiff [options] OLD [NEW]
39 git latexdiff [options] OLD \-\-
40 git latexdiff [options] \-\- OLD
41 Call latexdiff on two Git revisions of a file\&.
42
43 OLD and NEW are Git revision identifiers\&. NEW defaults to HEAD\&.
44 If "\-\-" is used for NEW, then diff against the working directory\&.
45
46 Options:
47 \-\-help this help message
48 \-\-help\-examples show examples of usage
49 \-\-main <file> name of the main LaTeX, R Sweave,
50 or Emacs Org mode file\&.
51 The search for the only file containing \*(Aqdocumentclass\*(Aq
52 will be attempted, if not specified\&.
53 For non\-LaTeX files, a reasonable `prepare` command
54 will be used unless explicitly provided
55 \-\-no\-view don\*(Aqt display the resulting PDF file
56 \-\-latex run latex instead of pdflatex
57 \-\-xelatex run xelatex instead of pdflatex
58 \-\-lualatex run lualatex instead of pdflatex
59 \-\-tectonic run tectonic instead of pdflatex
60 \-\-bibtex, \-\-bbl display changes in the bibliography
61 (runs bibtex to generate *\&.bbl files and
62 include them in the source file using
63 latexpand \-\-expand\-bbl before computing
64 the diff)
65 \-\-biber like \-\-bibtex, but runs biber instead\&.
66 \-\-run\-bibtex, \-b run bibtex as well as latex to generate the PDF file
67 (pdflatex,bibtex,pdflatex,pdflatex)
68 NOTE: \-\-bibtex usually works better
69 \-\-run\-biber run BibLaTex\-Biber as well as latex to generate the PDF file
70 (pdflatex,biber,pdflatex,pdflatex)
71 NOTE: \-\-biber usually works better
72 \-\-view view the resulting PDF file
73 (default if \-o is not used)
74 \-\-pdf\-viewer <cmd> use <cmd> to view the PDF file (default: $PDFVIEWER)
75 \-\-no\-cleanup don\*(Aqt cleanup temp dir after running
76 \-\-no\-flatten don\*(Aqt call latexpand to flatten the document
77 \-\-cleanup MODE Cleanup temporary files according to MODE:
78
79 \- keeppdf (default): keep only the
80 generated PDF file
81
82 \- none: keep all temporary files
83 (may eat your diskspace)
84
85 \- all: erase all generated files\&.
86 Problematic with \-\-view when the
87 viewer is e\&.g\&. evince, and doesn\*(Aqt
88 like when the file being viewed is
89 deleted\&.
90
91 \-\-latexmk use latexmk
92 \-\-build\-dir use pdfs from specific build directory
93 \-\-latexopt pass additional options to latex (e\&.g\&. \-shell\-escape)
94 \-o <file>, \-\-output <file>
95 copy resulting PDF into <file> (usually ending with \&.pdf)
96 Implies "\-\-cleanup all"
97 \-\-tmpdirprefix where temporary directory will be created (default: /tmp)\&.
98 Relative path will use repository root as a base
99 \-\-verbose, \-v give more verbose output
100 \-\-quiet redirect output from subprocesses to log files
101 \-\-prepare <cmd> run <cmd> before latexdiff (e\&.g\&. run make to generate
102 included files)
103 \-\-filter <cmd> run <cmd> after latexdiff and before compilation
104 (e\&.g\&. to fix up latexdiff output)
105 \-\-ln\-untracked symlink uncommited files from the working directory
106 \-\-ln\-untracked\-dir <dir>
107 symlink subdirectory of uncommited files (relative to the main \&.tex file)
108 \-\-version show git\-latexdiff version\&.
109 \-\-subtree checkout the tree at and below the main file
110 (enabled by default, disable with \-\-whole\-tree)
111 \-\-whole\-tree checkout the whole tree (contrast with \-\-subtree)
112 \-\-ignore\-latex\-errors keep on going even if latex gives errors, so long as
113 a PDF file is produced
114 \-\-ignore\-makefile ignore the Makefile, build as though it doesn\*(Aqt exist
115 \-* other options are passed directly to latexdiff
116 \-\-latexpand OPT pass option OPT to latexpand\&. Use multiple times like
117 \-\-latexpand OPT1 \-\-latexpand OPT2 to pass multiple options\&.
118 \-\-latexdiff\-flatten use \-\-flatten from latexdiff instead of latexpand
119 \-\-early\-exit\-if\-equal if two files are identical latexdiff will not be called and git\-latexdiff exits gracefully\&.
120 This option works only if latexpand is used
121
122 Unrecognized options are passed unmodified to latexdiff\&.
123 .fi
124 .if n \{\
125 .RE
126 .\}
127 .SH "EXAMPLES"
128 .sp
129 Diff the previous revision with the latest commit:
130 .sp
131 .if n \{\
132 .RS 4
133 .\}
134 .nf
135 git latexdiff HEAD^
136 .fi
137 .if n \{\
138 .RE
139 .\}
140 .sp
141 Diff the latest commit with the working tree:
142 .sp
143 .if n \{\
144 .RS 4
145 .\}
146 .nf
147 git latexdiff HEAD \-\-
148 .fi
149 .if n \{\
150 .RE
151 .\}
152 .sp
153 Diff latest commit with branch master:
154 .sp
155 .if n \{\
156 .RS 4
157 .\}
158 .nf
159 git latexdiff master HEAD
160 .fi
161 .if n \{\
162 .RE
163 .\}
164 .sp
165 Pass \-\-type=CHANGEBAR to latexdiff to get changebars in the margins instead of red+trike/blue+underline diff:
166 .sp
167 .if n \{\
168 .RS 4
169 .\}
170 .nf
171 git latexdiff \-\-type=CHANGEBAR HEAD^
172 .fi
173 .if n \{\
174 .RE
175 .\}
176 .sp
177 Use a specific latexdiff configuration file:
178 .sp
179 .if n \{\
180 .RS 4
181 .\}
182 .nf
183 git latexdiff \-\-config /path/to/file HEAD^
184 .fi
185 .if n \{\
186 .RE
187 .\}
188 .sp
189 Add a \emakeatletter statement to hopefuly fix some LaTeX compilation errors involving commands containing an @ character:
190 .sp
191 .if n \{\
192 .RS 4
193 .\}
194 .nf
195 git latexdiff \-\-latexpand \-\-makeatletter HEAD^
196 .fi
197 .if n \{\
198 .RE
199 .\}