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, --git or --hg β€” pick which version control system you're using. and if you don't specify one at all? latexdiff-vc will just venture a guess. brave of her, fr fr. πŸ”₯
    • latexdiff-cvs, latexdiff-rcs etc are variants of latexdiff-vc that default to their respective versioning system. but that default can still be overridden with the options above, so no worries.
    • > note: hg needs to support the --root option (version >= 2.9). check yourself before you wreck yourself. πŸ’€
  • -r, -r rev or --revision, --revision=rev β€” choose the revision (works under RCS, CVS, SVN, GIT or HG). you can hand her one or two -r options, and they each do a different thing:
    • latexdiff-vc -r file.tex ... β€” compares file.tex with the most recently checked-in version checked.
    • latexdiff-vc -r rev1 file.tex ... β€” compares file.tex with revision rev1.
    • latexdiff-vc -r rev1 -r rev2 file.tex ... β€” compares revisions rev1 and rev2 of file.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.
    • latexdiff-vc old.tex new.tex β€” compares two files.
    • the name of the difference file is generated automatically and reported to stdout. ✨
  • -d or --dir, -d path or --dir=path β€” instead of tacking the string diff (and optionally the version numbers you gave) onto the end of the output file, this prepends a directory name diff to 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 of diff. πŸŽ€
  • --flatten, --flatten=keep-intermediate β€” if you combine this with the --git, --svn or --hg option (or the corresponding modes), she checks out the revisions to compare into a separate temporary directory, and then passes the --flatten option along to latexdiff. the directory where you invoked latexdiff-vc defines 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 .bbl file in the version management. from latexdiff-vc >=1.3.4 there's an attempt to create the .bbl file by running bibtex in the retrieved subdirectories β€” but heads up, the bibtex runs in the temporary subdirectories, so any .bib or .bst files either need to be under version management, or in the global search paths for bibtex (shell environment variables BIBINPUTS and BSTINPUTS). 😭
    • 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 so that only pages with changes on them are displayed. this requires the use of subtype ZLABEL in latexdiff, which will be set automatically, but any manually set -s option will be overruled (it also requires the zref package to be installed). this option also disables internal links (as implemented by the hyperref package) and graphics markup.
    • > note that this option must be combined with --ps or --pdf to make sense. otherwise it's just vibes. πŸ™ˆ
  • --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 the latex command on the diff file after generating the diff file.
  • --dvi β€” run the latex and dvixxx commands after generating the diff file.
  • -c configfile, --config var1=val1,var2=val2,... or -c var1=val1,.. β€” set configuration variables for latexdiff and latexdiff-vc. the option can be repeated to set different variables (as an alternative to the comma-separated list). available variables for latexdiff-vc:
    • LATEXDIFF β€” latexdiff command (e.g. latexdiff-fast, latexdiff-so). this command should support the options -draftmode and -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. πŸ‘‘
  • --fast or --so β€” use latexdiff-fast or latexdiff-so, respectively (instead of latexdiff). ✨
  • --ps or --postscript β€” generate postscript output from the difference file. this will run the sequence latex; latex; dvips on the difference file.
    • > do not use this option in the rare cases where three latex commands are required, if you care about correct referencing. you have been warned, bestie. πŸ’€
    • if the difference file contains a \bibliography tag, she runs the sequence latex; bibtex; latex; latex; dvips.
  • --pdf β€” generate pdf output from the difference file using pdflatex. this will run the sequence pdflatex; pdflatex on the difference file, or pdflatex; bibtex; pdflatex; pdflatex for 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. πŸ¦‹
  • --help or -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