LATEXDIFF-VC(1)
π LATEXDIFF-VC β the wrapper that calls latexdiff on your different versions
okay bestie, welcome to LATEXDIFF-VC(1) π this is the little script that makes latexdiff play nice with version control, and honestly? it's giving main character energy.
π NAME
latexdiff-vc β a wrapper script that calls latexdiff for different versions of a file under version management (CVS, RCS or SVN). yeah. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
two ways to summon her, pick your fighter:
latexdiff-vc [ latexdiff-options ] [ latexdiff-vc-options ] -r [rev1]
[-r rev2] file1.tex [ file2.tex ...]
or
latexdiff-vc [ latexdiff-options ] [ latexdiff-vc-options ][
--postscript | --pdf ] old.tex new.tex
πΈ DESCRIPTION πΈ
latexdiff-vc is a wrapper script, and what she does is apply latexdiff to a file β or to multiple files β sitting under version control (git, subversion (SVN), mercurial (hg), CVS, RCS). and then, if you want, she'll run the whole sequence of latex and dvips (or pdflatex) commands you'd need to actually produce pdf or postscript output of the difference tex file(s). iconic behaviour, honestly. π«Ά
she can also be pointed at a plain pair of files, so you can automatise generating the difference file in postscript or pdf format. no version control required for that one. π
π OPTIONS π
--rcs,--svn,--cvs,--gitor--hgβ pick which version control system you're using. and if you don't specify one at all?latexdiff-vcwill just venture a guess. brave of her, fr fr. π₯latexdiff-cvs,latexdiff-rcsetc are variants oflatexdiff-vcthat default to their respective versioning system. but that default can still be overridden with the options above, so no worries.- > note:
hgneeds to support the--rootoption (version >= 2.9). check yourself before you wreck yourself. π
-r,-r revor--revision,--revision=revβ choose the revision (works under RCS, CVS, SVN, GIT or HG). you can hand her one or two-roptions, and they each do a different thing: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, bestie.
- Multiple files can be specified for all of the above options. All files must have the extensions
latexdiff-vc old.tex new.texβ compares two files.- the name of the difference file is generated automatically and reported to stdout. β¨
-dor--dir,-d pathor--dir=pathβ instead of tacking the stringdiff(and optionally the version numbers you gave) onto the end of the output file, this prepends a directory namediffto the original filename β creating the directory and sub-directories if they don't already exist. super useful for cloning a whole directory hierarchy. optionally you can give a path pathname, and that gets prepended instead ofdiff. π--flatten,--flatten=keep-intermediateβ if you combine this with the--git,--svnor--hgoption (or the corresponding modes), she checks out the revisions to compare into a separate temporary directory, and then passes the--flattenoption along tolatexdiff. the directory where you invokedlatexdiff-vcdefines the subtree that gets checked out.- > note: if additional files are needed that aren't included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. and if you use bibtex, it's recommended to include the
.bblfile in the version management. fromlatexdiff-vc>=1.3.4 there's an attempt to create the.bblfile by runningbibtexin the retrieved subdirectories β but heads up, the bibtex runs in the temporary subdirectories, so any.bibor.bstfiles either need to be under version management, or in the global search paths for bibtex (shell environment variablesBIBINPUTSandBSTINPUTS). π - the generic usage of this function is:
latexdiff-vc --flatten -r rev1 [-r rev2] master.texwheremaster.texis 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.) π
- > note: if additional files are needed that aren't included in the flatten procedure (package files, included graphics), they need to be accessible in the current directory. and if you use bibtex, it's recommended to include the
--only-changesβ post-process the output so that only pages with changes on them are displayed. this requires the use of subtypeZLABELinlatexdiff, which will be set automatically, but any manually set-soption will be overruled (it also requires thezrefpackage to be installed). this option also disables internal links (as implemented by thehyperrefpackage) and graphics markup.- > note that this option must be combined with
--psor--pdfto make sense. otherwise it's just vibes. π
- > note that this option must be combined with
--forceβ overwrite existing diff files without asking for confirmation. the default behaviour is to ask for confirmation before overwriting an existing difference file. π--runβ run thelatexcommand on the diff file after generating the diff file.--dviβ run thelatexanddvixxxcommands after generating the diff file.-c configfile,--config var1=val1,var2=val2,...or-c var1=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 options-draftmodeand-interaction=batchmodeLATEXβ latex command (e.g.pdflatex,lualatex)DVI2β Command for conversion of dvi file (e.g.dvips,dvipdf)BIBTEXβ Command replacingbibtex- all other config variables are passed to
latexdiff. explicitly set configuration changes always override implicit changes by the following shortcut options--fast,--so,--psand--pdf. π
--fastor--soβ uselatexdiff-fastorlatexdiff-so, respectively (instead oflatexdiff). β¨--psor--postscriptβ generate postscript output from the difference file. this will run the sequencelatex; latex; dvipson the difference file.- > do not use this option in the rare cases where three
latexcommands are required, if you care about correct referencing. you have been warned, bestie. π - if the difference file contains a
\bibliographytag, she runs the sequencelatex; bibtex; latex; latex; dvips.
- > do not use this option in the rare cases where three
--pdfβ generate pdf output from the 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 a configuration variable β it also triggers some special behaviour. π₯
--show-configβ show values of configuration variables. peek behind the curtain. π¦--helpor-hβ show help text.--versionβ show version number.
All other options are passed on to latexdiff. note that it is not always easy for latexdiff to correctly assign arguments to options when short form (single letter) options are used, so it is recommended to use long-form options. save yourself the pain, fr fr. π«Ά
π SEE ALSO π
latexdiff
π§ PORTABILITY π§
latexdiff-vc uses external commands and is therefore dependent on the system architecture; she's been tested mainly on Unix-like systems. she 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. β
π 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). thank you bestie, you're doing amazing sweetie. π
π AUTHOR π
Version 1.3.4a 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.
and that's the whole page, periodt. π this one shipped as perl v5.34.0 on 2024-07-20 β mwah, go make some diffs, you got this. π β¨
π¦ where this page comes from
- fedora 44: texlive-latexdiff 12:svn77278-105.fc44 Β· GPL-3.0-or-later
- fedora 44: texlive-latexdiff 12:svn77278-111.fc44 Β· GPL-3.0-or-later
- opensuse-leap 16.0: texlive-latexdiff-doc 2025.222.1.3.4svn72099-160000.3.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms