LATEXDIFF(1) LATEXDIFF(1) (NAME) latexdiff - LaTeX (SYNOPSIS) latexdiff [ OPTIONS ] old.tex new.tex > diff.tex (DESCRIPTION) latexdiff LaTeX . LaTeX "old.tex" "new.tex" ( ) . . old.tex new.tex ( pipe ) ( "--encoding" ). (preamble) . ( diff Unix ) . <<"%DIF >">> "new.tex" "old.tex" . <<"%DIF <">> . . "diff.tex" "new.tex" . latexdiff . latexdiff ( ) : 1. "old.tex" "new.tex" LaTeX "diff.tex" LaTeX . (: plain TeX "old.tex" "new.tex" "diff.tex" ). 2. . "diff.tex" . 3. "diff.tex" LaTeX . 4. "diff.tex" "new.tex" . diff . . . . ( "\caption" ) . ( ). LaTeX ( ) . . : \section{\textem{This is an emphasized section title}} \section {\textem{This is an emphasized section title}} \section\textem{This is an emphasized section title} LaTeX ( --allow-spaces ). LaTeX PICTUREENV "picture" "DIFnomarkup" --config ). ("DIFnomarkup") LaTeX . "\begin{DIFnomarkup}" "\end{DIFnomarkup}" . . (null-environment) : "\newenvironment{DIFnomarkup}{}{}" . . . . latexdiff <<"\DIF">> . "new.tex" "old.tex" "\DIFaddbegin" "\DIFaddend" . "\DIFdelbegin" "\DIFdelend" . "\DIFadd" : "\DIFadd{Added text block}" <<>> (safe) ( ). <<{>> <<}>> "\DIFadd" . <<"%DIF > ">> . "\DIFdel" . <<"%DIF < ">> . <<"%DIFDELCMD < ">> ..SH " (OPTIONS)" (Preamble) (preamble) . . --type=markupstyle -t markupstyle . "\DIFadd" "\DIFdel" . : "UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCHBAR BOLD PDFCOMMENT LUAUNDERLINE" [ : "UNDERLINE" ] --subtype=markstyle -s markstyle ( ) . "\DIFaddbegin" "\DIFaddend" "\DIFdelbegin" "\DIFdelend" . : "SAFE MARGIN COLOR DVIPSCOL ZLABEL ONLYCHANGEDPAGE (LABEL)*" [ : "SAFE" ] * "LABEL" --floattype=markstyle -f markstyle (floats) ( ). "\DIF...FL" . : "FLOATSAFE TRADITIONALSAFE IDENTICAL" [ : "FLOATSAFE" ] --encoding=enc -e enc old.tex new.tex . : "ascii" "utf8" "latin1" "latin9". : "perl -MEncode -e 'print join ("\n",Encode-"encodings( ":all" )) ;' > old.tex new.tex . [ utf8 "\usepackage[..]{inputenc}" . ASCII ( ) utf8 ] --preamble=file -p file . : "\DIFaddbegin, \DIFaddend, \DIFadd{..}, \DIFdelbegin,\DIFdelend,\DIFdel{..}," : "\DIFaddbeginFL, \DIFaddendFL, \DIFaddFL{..}, \DIFdelbeginFL, \DIFdelendFL, \DIFdelFL{..}" ( -t -s -f .) --packages=pkg1,pkg2,.. latexdiff .tex . .tex "\usepackage" . --packages --packages=none . : "endfloat" "\begin{figure}" "\end{figure}" . "hyperref" "\DIFadd" "\DIFdel" "\DIFaddtex" "\DIFdeltex" "\DIFadd" "\DIFdel" ( ). "apacite", "biblatex" . "siunitx" "\SI" ( ulem "\mbox" ). "cleveref" "\cref,\Cref" ( ulem "\mbox" ). "glossaries" glossaries (safe) \mbox . "mhchem" "\ce" ( "\cee" ). "chemformula" "chemmacros" "\ch" ( "\ch" ). [ : "\usepackage" . ] (Configuration) --exclude-safecmd=exclude-file -A exclude-file --exclude-safecmd="cmd1,cmd2,..." --replace-safecmd=replace-file --append-safecmd=append-file -a append-file --append-safecmd="cmd1,cmd2,..." (RegEx) "\DIFadd" "\DIFdel" . Perl-RegEx ( # % ). /^regex$/ <<\>> . --exclude-safecmd --append-safecmd --replace-safecmd . --exclude-safecmd --append-safecmd . <<\,>> . (shell) . --exclude-textcmd=exclude-file -X exclude-file --exclude-textcmd="cmd1,cmd2,..." --replace-textcmd=replace-file --append-textcmd=append-file -x append-file --append-textcmd="cmd1,cmd2,..." . --exclude-safecmd . --replace-context1cmd=replace-file --append-context1cmd=append-file --append-context1cmd="cmd1,cmd2,..." "\caption" (figure) . . --replace-context2cmd=replace-file --append-context2cmd=append-file --append-context2cmd="cmd1,cmd2,..." context1. context2 . context2 ( ). context2 "\author" ( ). . "--replace-context2cmd" . --exclude-mboxsafecmd=exclude-file --exclude-mboxsafecmd="cmd1,cmd2,..." --append-mboxsafecmd=append-file --append-mboxsafecmd="cmd1,cmd2,..." "\mbox{..}" . ulem UNDERLINE CULINECHBAR CFONTSTRIKE . --config var1=val1,var2=val2,... -c var1=val1,.. -c configfile . ( ). ( ): "ARRENV" (RegEx) "COUNTERCMD" (RegEx) "CUSTODIFCMD" (RegEx) "FLOATENV" (RegEx) "ITEMCMD" (RegEx) "LISTENV" (RegEx) "MATHARRENV" (RegEx) "MATHENV" (RegEx) "MATHREPL" (String) "MAXCHANGESLETTER" (Integer) "MINWORDSBLOCK" (Integer) "PICTUREENV" (RegEx) "SCALEDELGRAPHICS" (Float).IP "--add-to-config varenv1=pattern1,varenv2=pattern2,..." 4 (regular expression) ( ENV COUNTERCMD CUSTOMDIFCMD ) . . "varenv" pattern ( ). (;) : "--add-to-config "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote"" --show-preamble (preamble) . --show-safecmd RegEx (safe commands). --show-textcmd RegEx . --show-config . --show-all --show. : --show "old.tex" "new.tex" . . .tex . (differencing) . (Other configuration options): --allow-spaces (space) . ( ) . ( ). --math-markup=level (granularity) : level ( ): "off" 0: . diff . latex . "whole" 1: . . coarse fine latex . "coarse" 2: ( displaymath equation) . . [] "fine" 3: . . --graphics-markup=level C<\includegraphics>. level: "none" "off" 0: "new-only" 1: [ graphicx] "both" 2: . SCALEDELGRAPHICS . latexdiff . "Misplaced \noalign" . "--graphics-markup=none" . --no-del diff. BOLD diff . . --disable-citation-markup --disable-auto-mbox (citation) ulem (UNDERLINE FONTSTRIKE CULINECHBAR) ( ) --enable-citation-markup --enforce-auto-mbox "\mbox" ulem ( ) (Miscellaneous) --verbose -V stderr . . --driver=type changebar ( changebar : CCHANGEBAR CFONTCHBAR CULINECHBAR CHANGEBAR). changebar pdftex dvips dvitops [: pdftex] --ignore-warnings . latex "latexdiff" latex . --label=label -L label . : "-L labelold -L labelnew". [: ] --no-label () . --visible-label ( "--label") . --flatten "\input" "\include" . "\includeonly" (preamble) . (recursion) "\input" "\include" . . --flatten "\input" . import ("\import" "\subimport") "\subfile" . . --filter-script=filterscript (filterscript - ) . STDIN STDOUT . --flatten . --ignore-filter-stderr --filter-script STDERR . STDERR . --help -h --version .SS " (Internal options)" latexdiff- vc . (API) . --no-links (hyperreference) ( --only-changes latexdiff-vc). (Predefined styles) (Major types) "\DIFadd{...}" "\DIFdel{...}" . "UNDERLINE" ( color ulem). (Overstriking) (displayed math) ( ulem ). "LUAUNDERLINE" ( lua-ul LuaLaTeX). "CTRADITIONAL" (sans-serif) ( color). "TRADITIONAL" "CTRADITIONAL" . "CFONT" . "FONTSTRIKE" . "CCHANGEBAR" . ( color changebar). "CFONTCHBAR" "CFONT" ( color changebar). "CULINECHBAR" "UNDERLINE" ( color ulem changebar). "CHANGEBAR" ( changebar). "INVISIBLE" ( ). "BOLD" (bold) ( --no-del ). "PDFCOMMENT" pdfcomment (comment) PDF . PDF . PDF acroread . . (Subtypes) ( : "\DIFaddbegin, \DIFaddend, \DIFdelbegin, \DIFdelend"). "SAFE" ( ). "MARGIN" ( "\marginpar" - ). "COLOR" ( dvipscol ). "DVIPSCOL" . "DVIPSCOL" dvips pdflatex ( dvipscol ). "ZLABEL" . "latexdiff-vc" "--only-changes" . (preamble) diff . "ONLYCHANGEDPAGE" ( ) . "LABEL" "ZLABEL" zref (). (Float Types) ( ) . . . "FLOATSAFE" . "MARGIN" "\marginpar" . "TRADITIONALSAFE" . \[ \] scriptscript . "TRADITIONAL" "CTRADITIONAL" \footnote . "IDENTICAL" ..SS " (Configuration Variables)" "ARRENV" "ARRENV" "\mbox{"..."}" . (underlining) . [ : "ARRENV"="(?:array|[pbvBV]matrix)" "COUNTERCMD" textcmd "COUNTERCMD" "\addtocounter{"cntcmd"}{-1}" cntcmd diff diff . [ : "COUNTERCMD"="(?:footnote|part|section|subsection" ... "|subsubsection|paragraph|subparagraph)" ] "CUSTOMDIFCMD" . "CUSTOMDIFCMD" ADD DEL . ( --preamble). "\blindtext" ( blindtext) . : "\newcommand{\DELblindtext}{{\color{red}\blindtext}}" "\newcommand{\ADDblindtext}{{\color{blue}\blindtext}}" latexdiff "-c CUSTOMDIFCMD=blindtext" . [ : none ] "FLOATENV" "FLOATENV" . latexdiff FL . [ : "(?:figure|table|plate)[\w\d*@]*" ] "ITEMCMD" . [ : \"item" ] "LISTENV" "LISTENV" . [ : "(?:itemize|enumerate|description)" ] "MATHENV","MATHREPL" \begin \end ( "MATHENV" \[ \]) \begin \end "MATHREPL" . [ : "MATHENV"="(?:displaymath|equation)" , "MATHREPL"="displaymath" ] "MAXCHANGESLETTER" latexdiff . . latexdiff . ( !) MAXCHANGESLETTER . 0 1 2 . 0 . 1 / . 2 ( ) --- they-> there "y" "re" . [ : 1 ] "MINWORDSBLOCK" . "MINWORDSBLOCK" . [ : 3 ] "PICTUREENV" "PICTUREENV" latexdiff ( ). [ : "(?:picture|DIFnomarkup)[\w\d*@]*" ] "SCALEDELGRAPHICS" "--graphics-markup=both" "SCALEDELGRAPHICS" ( 0.5 ). [ : 0.5 ] "VERBATIMENV" (RegEx) verbatim . : [ : "comment" ] "VERBATIMLINEENV" (RegEx) verbatim . VERBATIMLINEENV listings . ( -t) . "listings.sty" . (fallback) VERBATIMLINEENV VERBATIMENV . [ : "(?:verbatim[*]?|lstlisting" ] (DIRECTIVES) "latexdiff" tex . (directives) tex latexdiff . "BEGIN" "END" . BEGIN/END . . . (scope boundaries) . latexdiff . " ... %BEGIN DIFADD ... %END DIFADD ... "%BEGIN DIFADD" "%END DIFADD" () . . . latexdiff . (en bloc) . "DIFADD" . . " ... %BEGIN DIFDEL ... %END DIFDEL ... "%BEGIN DIFDEL" "%END DIFDEL" . . "DIFDEL" . . "DIFADD" . "DIFDEL" "DIFADD" latexdiff . " ... %BEGIN DIFNOMARKUP ... %END DIFNOMARKUP ... diff . () . DIFNOMARKUP "\DIFaddend" "%BEGIN DIFNOMARKUP" "\DIFadd" "%BEGIN DIFNOMARKUP" . latexdiff - "DIFNOMARKUP" latexdiff ( latexdiff latexdiff ). ( ) ..SH " (COMMON PROBLEMS AND FAQ)" overfull box "ulem" ( "latexdiff" UNDERLINE ) . "\mbox" . mbox overfull box ( ) . ( siunitx) . . 1. "CFONT" ( "-t CFONT") : () () . "ulem" . 2. "--disable-citation-markup" : . ( latexdiff 0.6 ). "\mbox" "--append-mboxsafecmd" "--excludemboxsafecmd" ( github ). 3. luatex >= 1.12.0 LUAUNDERLINE lua-ul ulem ( ). latex . "--math-markup=whole" . "--math-markup=off" . . ulem . amsmath "\text" "\usepackage{amsmath}" (preamble) . ( amsmath latexdiff "--packages=amsmath" latexdiff ). "--s ZLABEL" ( ) "-s ONLYCHANGEDPAGE" . "latexdiff-vc --ps|--pdf" "--only-changes" ( zref ). latexdiff powershell . "latexdiff" "powershell" Windows . "cmd" . (KNOWN BUGS) "--allow-spaces" . . https://github.com/ftilmann/latexdiff.git tilmann -- AT -- gfz-potsdam.de . latexdiff ( --version). latex latex . (class) . latex . (SEE ALSO) latexrevise, latexdiff-vc (PORTABILITY) latexdiff Perl 5.6 . ASCII UTF-8 Perl 5.8 . latexdiff "Algorithm::Diff" ( www.cpan.org - http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15) latexdiff-so . latexdiff-fast diff . (AUTHOR) 1.4.0 (C) 2004-2024 Frederik Tilmann (GNU General Public License Version 3) . : V. Kuhlmann J. Paisley N. Becker T. Doerges K. Huebner T. Connors Sebastian Gouezel . . perl v5.38.2 2025-12-30 LATEXDIFF(1)