LATEXDIFF-VC(1)
๐ LATEXDIFF-VC โ bestie edition
okay so you found latexdiff-vc (that's the LATEXDIFF-VC(1) page, you're in the right place, welcome ๐ซถ) and honestly? it's giving "I make your paper's diff look cute under version control". sit down, hydrate, let's go.
โจ NAME โจ
latexdiff-vc โ a wrapper script that calls latexdiff for different versions of a file under version management (CVS, RCS or SVN). yes bestie, it's the little delegator that could ๐
๐ธ SYNOPSIS ๐ธ
latexdiff-vc [ latexdiff-options ] [ latexdiff-vc-options ] -r [rev1]
[-r rev2] file1.tex [ file2.tex ...]
or, if you're doing the two-file thing:
latexdiff-vc [ latexdiff-options ] [ latexdiff-vc-options ][
--postscript | --pdf ] old.tex new.tex
๐ฆ DESCRIPTION ๐ฆ
latexdiff-vc is a wrapper script that applies latexdiff to a file, or multiple files under version control (git, subversion (SVN), mercurial (hg), CVS, RCS), and optionally runs the sequence of latex and dvips or pdflatex commands necessary to produce pdf or postscript output of the difference tex file(s). it can also be applied to a pair of files to automatise the generation of difference file in postscript or pdf format. no cap, that's the whole vibe ๐
๐ OPTIONS ๐
--rcs,--svn,--cvs,--gitor--hgโ pick your version control system, icon that you are. if no version system is specified,latexdiff-vcwill venture a guess (it's lowkey psychic like that ๐ฎ)
latexdiff-cvs, latexdiff-rcs etc are variants of latexdiff-vc which default to the respective versioning system. however, this default can still be overridden using the options above.
note thathgneeds to support the--rootoption (version >= 2.9) ๐
-r,-rrev or--revision,--revision=rev โ choose revision (under RCS, CVS, SVN, GIT or HG). one or two-roptions can be specified, and they result in different behaviour, so pay attention bestie:latexdiff-vc -r file.tex ...comparesfile.texwith the most recently checked-in version checked.latexdiff-vc -r rev1 file.tex ...comparesfile.texwith revision rev1.latexdiff-vc -r rev1 -r rev2 file.tex ...compares revisions rev1 and rev2 offile.tex.- multiple files can be specified for all of the above options. all files must have the extensions
.tex,.bbl, or.flt, though. (that's the rule, periodt ๐ซ) latexdiff-vc old.tex new.texcompares two files.
the name of the difference file is generated automatically and reported to stdout. slay.
-dor--dir,-dpath or--dir=path โ rather than appending the stringdiffand optionally the version numbers given to the output-file, this will prepend a directory namediffto the original filename, creating the directory and sub-directories should they not exist already. this is particularly useful in order to clone a complete directory hierarchy. optionally, a pathname path can be specified, which is prepended instead ofdiff. ๐๏ธโจ--flatten,--flatten=keep-intermediateโ if combined with--git,--svnor--hgoption or the corresponding modes, check out the revisions to compare in a separate temporary directory, and then pass on option--flattentolatexdiff. the directory in whichlatexdiff-vcis invoked defines the subtree which will be checked out. note that if additional files are needed which are not included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. if you use bibtex, it is recommended to include the.bblfile in the version management.
the generic usage of this function is: latexdiff-vc --flatten -r rev1 [-r rev2] master.tex where master.tex is the project file containing the highest level of includes etc.
with --flatten=keep-intermediate, the intermediate revision snapshots are kept in the current directory (default is to store them in a temporary directory and delete them after generating the diff file.) ๐
--only-changesโ post-process the output such that only pages with changes on them are displayed. this requires the use of subtype ZLABEL inlatexdiff, which will be set automatically, but any manually set-soption will be overruled (also requireszrefpackage to be installed). this option also disables internal links (as implemented byhyperrefpackage) and graphics markup. (note that this option must be combined with--psor--pdfto make sense) โ so don't skip that part, it literally will not make sense otherwise ๐ญ--forceโ overwrite existing diff files without asking for confirmation. default behaviour is to ask for confirmation before overwriting an existing difference file. (so if you're the "yolo, just do it" type, this is your option ๐ )--runโ runlatexcommand on diff file after generation of diff file.--dviโ runlatexanddvixxxcommands after generation of diff file.-cconfigfile =item--configvar1=val1,var2=val2,... or-cvar1=val1,.. โ set configuration variables forlatexdiffandlatexdiff-vc. the option can be repeated to set different variables (as an alternative to the comma-separated list). available variables forlatexdiff-vc:"LATEXDIFF"โ latexdiff command (e.g.latexdiff-fast,latexdiff-so). this command should support the option--interaction=batchmode"LATEX"โ latex command (e.g.pdflatex,lualatex)"DVI2"โ command for conversion of dvi file (e.g.dvips,dvipdf)"BIBTEX"โ command replacing bibtex
all other config variables are passed to latexdiff. explicitly set configuration changes always override implicit changes by the following shortcut options --fast, --so, --ps and --pdf. โก
--fastor--soโ uselatexdiff-fastorlatexdiff-so, respectively (instead oflatexdiff).--psor--postscriptโ generate postscript output from difference file. this will run the sequencelatex; latex; dvipson the difference file (do not use this option in the rare cases, where threelatexcommands are required if you care about correct referencing). if the difference file contains a\bibliographytag, run the sequencelatex; bibtex; latex; latex; dvips. ๐ฅ--pdfโ generate pdf output from difference file usingpdflatex. this will run the sequencepdflatex; pdflatexon the difference file, orpdflatex; bibtex; pdflatex; pdflatexfor files requiring bibtex. note that this is not just a shortcut for setting configuration variable but also triggers some special behaviour. (main character energy fr ๐)--show-configโ show values of configuration variables.--helpor-hโ show help text.--versionโ show version number.
all other options are passed on to latexdiff. ๐ซ
๐ SEE ALSO ๐
latexdiff โ go read that one too, bestie, they're a package deal ๐ซถ
๐ PORTABILITY ๐
latexdiff-vc uses external commands and is therefore dependent on the system architecture; it has been tested mainly on Unix-like systems. it also requires a version control system and latex to be installed on the system to make use of all features. modules from Perl 5.8 or higher are required. (yes, 5.8. we don't make the rules, we just report them ๐)
๐ BUG REPORTING ๐
please submit bug reports using the issue tracker of the github repository page https://github.com/ftilmann/latexdiff.git, or send them to tilmann -- AT -- gfz-potsdam.de. include the version number of latexdiff-vc (option --version). we love a well-documented bug report, it's giving considerate ๐
โจ AUTHOR โจ
version 1.2.1 copyright (C) 2005-2017 Frederik Tilmann
this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3. contributors: S Utcke, H Bruyninckx; some ideas have been inspired by git-latexdiff bash script. C. Junghans: Mercurial Support. (shoutout to the whole squad ๐)
and that's the whole page, bestie โจ this one's from perl v5.34.0, dated 2022-07-14, and it was a whole LATEXDIFF-VC(1) moment. now go diff something cute ๐
๐ฆ where this page comes from
- debian bookworm: latexdiff 1.3.2-1 ยท GPL-3.0-only
- debian trixie: latexdiff 1.3.2-1 ยท GPL-3.0-only
- ubuntu noble: latexdiff 1.3.2-1 ยท GPL-3.0-only
- ubuntu questing: latexdiff 1.3.2-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms