1LATEXDIFF(1) LATEXDIFF(1)
2
3
4
6 latexdiff - determine and markup differences between two latex files
7
9 latexdiff [ OPTIONS ] old.tex new.tex > diff.tex
10
12 Briefly, latexdiff is a utility program to aid in the management of
13 revisions of latex documents. It compares two valid latex files, here
14 called "old.tex" and "new.tex", finds significant differences between
15 them (i.e., ignoring the number of white spaces and position of line
16 breaks), and adds special commands to highlight the differences. Where
17 visual highlighting is not possible, e.g. for changes in the
18 formatting, the differences are nevertheless marked up in the source.
19
20 The program treats the preamble differently from the main document.
21 Differences between the preambles are found using line-based
22 differencing (similarly to the Unix diff command, but ignoring white
23 spaces). A comment, ""%DIF >"" is appended to each added line, i.e. a
24 line present in "new.tex" but not in "old.tex". Discarded lines
25 are deactivated by prepending ""%DIF <"". Changed blocks are preceded
26 by comment lines giving information about line numbers in the original
27 files. Where there are insignificant differences, the resulting file
28 "diff.tex" will be similar to "new.tex". At the end of the preamble,
29 the definitions for latexdiff markup commands are inserted. In
30 differencing the main body of the text, latexdiff attempts to satisfy
31 the following guidelines (in order of priority):
32
33 1. If both "old.tex" and "new.tex" are valid LaTeX, then the resulting
34 "diff.tex" should also be valid LateX. (NB If a few plain TeX
35 commands are used within "old.tex" or "new.tex" then "diff.tex" is
36 not guaranteed to work but usually will).
37
38 2. Significant differences are determined on the level of individual
39 words. All significant differences, including differences between
40 comments should be clearly marked in the resulting source code
41 "diff.tex".
42
43 3. If a changed passage contains text or text-producing commands, then
44 running "diff.tex" through LateX should produce output where added
45 and discarded passages are highlighted.
46
47 4. Where there are insignificant differences, e.g. in the positioning
48 of line breaks, "diff.tex" should follow the formatting of "new.tex"
49
50 For differencing the same algorithm as diff is used but words instead
51 of lines are compared. An attempt is made to recognize blocks which
52 are completely changed such that they can be marked up as a unit.
53 Comments are differenced line by line but the number of spaces within
54 comments is ignored. Commands including all their arguments are
55 generally compared as one unit, i.e., no mark-up is inserted into the
56 arguments of commands. However, for a selected number of commands (for
57 example, "\caption" and all sectioning commands) the last argument is
58 known to be text. This text is split into words and differenced just as
59 ordinary text (use options to show and change the list of text
60 commands, see below). As the algorithm has no detailed knowledge of
61 LaTeX, it assumes all pairs of curly braces immediately following a
62 command (i.e. a sequence of letters beginning with a backslash) are
63 arguments for that command. As a restriction to condition 1 above it
64 is thus necessary to surround all arguments with curly braces, and to
65 not insert extraneous spaces. For example, write
66
67 \section{\textem{This is an emphasized section title}}
68
69 and not
70
71 \section {\textem{This is an emphasized section title}}
72
73 or
74
75 \section\textem{This is an emphasized section title}
76
77 even though all varieties are the same to LaTeX (but see --allow-spaces
78 option which allows the second variety).
79
80 For environments whose content does not conform to standard LaTeX or
81 where graphical markup does not make sense all markup commands can be
82 removed by setting the PICTUREENV configuration variable, set by
83 default to "picture" and "DIFnomarkup" environments; see --config
84 option). The latter environment ("DIFnomarkup") can be used to protect
85 parts of the latex file where the markup results in illegal markup. You
86 have to surround the offending passage in both the old and new file by
87 "\begin{DIFnomarkup}" and "\end{DIFnomarkup}". You must define the
88 environment in the preambles of both old and new documents. I prefer to
89 define it as a null-environment,
90
91 "\newenvironment{DIFnomarkup}{}{}"
92
93 but the choice is yours. Any markup within the environment will be
94 removed, and generally everything within the environment will just be
95 taken from the new file.
96
97 It is also possible to difference files which do not have a preamble.
98 In this case, the file is processed in the main document mode, but the
99 definitions of the markup commands are not inserted.
100
101 All markup commands inserted by latexdiff begin with ""\DIF"". Added
102 blocks containing words, commands or comments which are in "new.tex"
103 but not in "old.tex" are marked by "\DIFaddbegin" and "\DIFaddend".
104 Discarded blocks are marked by "\DIFdelbegin" and "\DIFdelend". Within
105 added blocks all text is highlighted with "\DIFadd" like this:
106 "\DIFadd{Added text block}" Selected `safe' commands can be contained
107 in these text blocks as well (use options to show and change the list
108 of safe commands, see below). All other commands as well as braces "{"
109 and "}" are never put within the scope of "\DIFadd". Added comments
110 are marked by prepending ""%DIF > "".
111
112 Within deleted blocks text is highlighted with "\DIFdel". Deleted
113 comments are marked by prepending ""%DIF < "". Non-safe command and
114 curly braces within deleted blocks are commented out with
115 ""%DIFDELCMD < "".
116
118 Preamble
119 The following options determine the visual markup style by adding the
120 appropriate command definitions to the preamble. See the end of this
121 section for a description of available styles.
122
123 --type=markupstyle or -t markupstyle
124 Add code to preamble for selected markup style. This option defines
125 "\DIFadd" and "\DIFdel" commands. Available styles:
126
127 "UNDERLINE CTRADITIONAL TRADITIONAL CFONT FONTSTRIKE INVISIBLE
128 CHANGEBAR CCHANGEBAR CULINECHBAR CFONTCBHBAR BOLD PDFCOMMENT"
129
130 [ Default: "UNDERLINE" ]
131
132 --subtype=markstyle or -s markstyle
133 Add code to preamble for selected style for bracketing commands
134 (e.g. to mark changes in margin). This option defines
135 "\DIFaddbegin", "\DIFaddend", "\DIFdelbegin" and "\DIFdelend"
136 commands. Available styles: "SAFE MARGIN COLOR DVIPSCOL ZLABEL
137 ONLYCHANGEDPAGE (LABEL)*"
138
139 [ Default: "SAFE" ] * Subtype "LABEL" is deprecated
140
141 --floattype=markstyle or -f markstyle
142 Add code to preamble for selected style which replace standard
143 marking and markup commands within floats (e.g., marginal remarks
144 cause an error within floats so marginal marking can be disabled
145 thus). This option defines all "\DIF...FL" commands. Available
146 styles: "FLOATSAFE TRADITIONALSAFE IDENTICAL"
147
148 [ Default: "FLOATSAFE" ]
149
150 --encoding=enc or -e enc
151 Specify encoding of old.tex and new.tex. Typical encodings are
152 "ascii", "utf8", "latin1", "latin9". A list of available encodings
153 can be obtained by executing
154
155 "perl -MEncode -e 'print join ("\n",Encode-"encodings( ":all" )) ;'
156 >
157
158 [Default encoding is utf8 unless the first few lines of the
159 preamble contain an invocation "\usepackage[..]{inputenc}" in which
160 case the encoding chosen by this command is asssumed. Note that
161 ASCII (standard latex) is a subset of utf8]
162
163 --preamble=file or -p file
164 Insert file at end of preamble instead of generating preamble. The
165 preamble must define the following commands "\DIFaddbegin,
166 \DIFaddend, \DIFadd{..}, \DIFdelbegin,\DIFdelend,\DIFdel{..}," and
167 varieties for use within floats "\DIFaddbeginFL, \DIFaddendFL,
168 \DIFaddFL{..}, \DIFdelbeginFL, \DIFdelendFL, \DIFdelFL{..}" (If
169 this option is set -t, -s, and -f options are ignored.)
170
171 --packages=pkg1,pkg2,..
172 Tell latexdiff that .tex file is processed with the packages in
173 list loaded. This is normally not necessary if the .tex file
174 includes the preamble, as the preamble is automatically scanned for
175 "\usepackage" commands. Use of the --packages option disables
176 automatic scanning, so if for any reason package specific parsing
177 needs to be switched off, use --packages=none. The following
178 packages trigger special behaviour:
179
180 "amsmath"
181 Configuration variable MATHARRREPL is set to "align*"
182 (Default: "eqnarray*"). (Note that many of the amsmath
183 array environments are already recognised by default as
184 such)
185
186 "endfloat"
187 Ensure that "\begin{figure}" and "\end{figure}" always
188 appear by themselves on a line.
189
190 "hyperref"
191 Change name of "\DIFadd" and "\DIFdel" commands to
192 "\DIFaddtex" and "\DIFdeltex" and define new "\DIFadd" and
193 "\DIFdel" commands, which provide a wrapper for these
194 commands, using them for the text but not for the link
195 defining command (where any markup would cause errors).
196
197 "apacite"
198 Redefine the commands recognised as citation commands.
199
200 "siunitx"
201 Treat "\SI" as equivalent to citation commands (i.e.
202 protect with "\mbox" if markup style uses ulem package.
203
204 "cleveref"
205 Treat "\cref,\Cref", etc as equivalent to citation commands
206 (i.e. protect with "\mbox" if markup style uses ulem
207 package.
208
209 "glossaries"
210 Define most of the glossaries commands as safe, protecting
211 them with \mbox'es where needed
212
213 "mhchem"
214 Treat "\ce" as a safe command, i.e. it will be highlighted
215 (note that "\cee" will not be highlighted in equations as
216 this leads to processing errors)
217
218 "chemformula" or "chemmacros"
219 Treat "\ch" as a safe command outside equations, i.e. it
220 will be highlighted (note that "\ch" will not be
221 highlighted in equations as this leads to processing
222 errors)
223
224 [ Default: scan the preamble for "\usepackage" commands to
225 determine
226 loaded packages. ]
227
228 --show-preamble
229 Print generated or included preamble commands to stdout.
230
231 Configuration
232 --exclude-safecmd=exclude-file or -A exclude-file or
233 --exclude-safecmd="cmd1,cmd2,..."
234 --replace-safecmd=replace-file
235 --append-safecmd=append-file or -a append-file or
236 --append-safecmd="cmd1,cmd2,..."
237 Exclude from, replace or append to the list of regular expressions
238 (RegEx) matching commands which are safe to use within the scope of
239 a "\DIFadd" or "\DIFdel" command. The file must contain one Perl-
240 RegEx per line (Comment lines beginning with # or % are ignored).
241 Note that the RegEx needs to match the whole of the token, i.e.,
242 /^regex$/ is implied and that the initial "\" of the command is not
243 included. The --exclude-safecmd and --append-safecmd options can
244 be combined with the ---replace-safecmd option and can be used
245 repeatedly to add cumulatively to the lists.
246 --exclude-safecmd and --append-safecmd can also take a comma
247 separated list as input. If a comma for one of the regex is
248 required, escape it thus "\,". In most cases it will be necessary
249 to protect the comma-separated list from the shell by putting it in
250 quotation marks.
251
252 --exclude-textcmd=exclude-file or -X exclude-file or
253 --exclude-textcmd="cmd1,cmd2,..."
254 --replace-textcmd=replace-file
255 --append-textcmd=append-file or -x append-file or
256 --append-textcmd="cmd1,cmd2,..."
257 Exclude from, replace or append to the list of regular expressions
258 matching commands whose last argument is text. See entry for
259 --exclude-safecmd directly above for further details.
260
261 --replace-context1cmd=replace-file
262 --append-context1cmd=append-file or
263 --append-context1cmd="cmd1,cmd2,..."
264 Replace or append to the list of regex matching commands whose last
265 argument is text but which require a particular context to work,
266 e.g. "\caption" will only work within a figure or table. These
267 commands behave like text commands, except when they occur in a
268 deleted section, when they are disabled, but their argument is
269 shown as deleted text.
270
271 --replace-context2cmd=replace-file
272 --append-context2cmd=append-file or
273 --append-context2cmd="cmd1,cmd2,..."
274 As corresponding commands for context1. The only difference is
275 that context2 commands are completely disabled in deleted sections,
276 including their arguments.
277
278 --exclude-mboxsafecmd=exclude-file or
279 --exclude-mboxsafecmd="cmd1,cmd2,..."
280 --append-mboxsafecmd=append-file or
281 --append-mboxsafecmd="cmd1,cmd2,..."
282 Define safe commands, which additionally need to be protected by
283 encapsulating in an "\mbox{..}". This is sometimes needed to get
284 around incompatibilities between external packages and the ulem
285 package, which is used for highlighting in the default style
286 UNDERLINE as well as CULINECHBAR CFONTSTRIKE
287
288 --config var1=val1,var2=val2,... or -c var1=val1,..
289 -c configfile
290 Set configuration variables. The option can be repeated to set
291 different variables (as an alternative to the comma-separated
292 list). Available variables (see below for further explanations):
293
294 "ARRENV" (RegEx)
295
296 "COUNTERCMD" (RegEx)
297
298 "FLOATENV" (RegEx)
299
300 "ITEMCMD" (RegEx)
301
302 "LISTENV" (RegEx)
303
304 "MATHARRENV" (RegEx)
305
306 "MATHARRREPL" (String)
307
308 "MATHENV" (RegEx)
309
310 "MATHREPL" (String)
311
312 "MINWORDSBLOCK" (Integer)
313
314 "PICTUREENV" (RegEx)
315
316 "SCALEDELGRAPHICS" (Float)
317
318 --add-to-config varenv1=pattern1,varenv2=pattern2,...
319 For configuration variables, which are a regular expression
320 (essentially those ending in ENV, and COUNTERCMD, see list above)
321 this provides an alternative way to modify the configuration
322 variables. Instead of setting the complete pattern, with this
323 option it is possible to add an alternative pattern. "varenv" must
324 be one of the variables listed above that take a regular expression
325 as argument, and pattern is any regular expression (which might
326 need to be protected from the shell by quotation). Several patterns
327 can be added at once by using semi-colons to separate them, e.g.
328 "--add-to-config
329 "LISTENV=myitemize;myenumerate,COUNTERCMD=endnote""
330
331 --show-safecmd
332 Print list of RegEx matching and excluding safe commands.
333
334 --show-textcmd
335 Print list of RegEx matching and excluding commands with text
336 argument.
337
338 --show-config
339 Show values of configuration variables.
340
341 --show-all
342 Combine all --show commands.
343
344 NB For all --show commands, no "old.tex" or "new.tex" file needs to
345 be specified, and no differencing takes place.
346
347 Other configuration options:
348 --allow-spaces
349 Allow spaces between bracketed or braced arguments to commands.
350 Note that this option might have undesirable side effects
351 (unrelated scope might get lumpeded with preceding commands) so
352 should only be used if the default produces erroneous results.
353 (Default requires arguments to directly follow each other without
354 intervening spaces).
355
356 --math-markup=level
357 Determine granularity of markup in displayed math environments:
358 Possible values for level are (both numerical and text labels are
359 acceptable):
360
361 "off" or 0: suppress markup for math environments. Deleted
362 equations will not appear in diff file. This mode can be used if
363 all the other modes cause invalid latex code.
364
365 "whole" or 1: Differencing on the level of whole equations. Even
366 trivial changes to equations cause the whole equation to be marked
367 changed. This mode can be used if processing in coarse or fine
368 mode results in invalid latex code.
369
370 "coarse" or 2: Detect changes within equations marked up with a
371 coarse granularity; changes in equation type (e.g.displaymath to
372 equation) appear as a change to the complete equation. This mode is
373 recommended for situations where the content and order of some
374 equations are still being changed. [Default]
375
376 "fine" or 3: Detect small change in equations and mark up at fine
377 granularity. This mode is most suitable, if only minor changes to
378 equations are expected, e.g. correction of typos.
379
380 --graphics-markup=level
381 Change highlight style for graphics embedded with C<\includegraphics> commands.
382
383 Possible values for level:
384
385 "none", "off" or 0: no highlighting for figures
386
387 "new-only" or 1: surround newly added or changed figures with a
388 blue frame [Default if graphicx package loaded]
389
390 "both" or 2: highlight new figures with a blue frame and show
391 deleted figures at reduced scale, and crossed out with a red
392 diagonal cross. Use configuration variable SCALEDELGRAPHICS to set
393 size of deleted figures.
394
395 Note that changes to the optional parameters will make the figure
396 appear as changed to latexdiff, and this figure will thus be
397 highlighted
398
399 --disable-citation-markup or --disable-auto-mbox
400 Suppress citation markup and markup of other vulnerable commands in
401 styles using ulem (UNDERLINE,FONTSTRIKE, CULINECHBAR) (the two
402 options are identical and are simply aliases)
403
404 --enable-citation-markup or --enforce-auto-mbox
405 Protect citation commands and other vulnerable commands in changed
406 sections with "\mbox" command, i.e. use default behaviour for ulem
407 package for other packages (the two options are identical and are
408 simply aliases)
409
410 Miscellaneous
411 --verbose or -V
412 Output various status information to stderr during processing.
413 Default is to work silently.
414
415 --driver=type
416 Choose driver for changebar package (only relevant for styles using
417 changebar: CCHANGEBAR CFONTCHBAR CULINECHBAR CHANGEBAR).
418 Possible drivers are listed in changebar manual, e.g.
419 pdftex,dvips,dvitops
420 [Default: dvips]
421
422 --ignore-warnings
423 Suppress warnings about inconsistencies in length between input and
424 parsed strings and missing characters. These warning messages are
425 often related to non-standard latex or latex constructions with a
426 syntax unknown to "latexdiff" but the resulting difference argument
427 is often fully functional anyway, particularly if the non-standard
428 latex only occurs in parts of the text which have not changed.
429
430 --label=label or -L label
431 Sets the labels used to describe the old and new files. The first
432 use of this option sets the label describing the old file and the
433 second use of the option sets the label for the new file, i.e. set
434 both labels like this "-L labelold -L labelnew". [Default: use the
435 filename and modification dates for the label]
436
437 --no-label
438 Suppress inclusion of old and new file names as comment in output
439 file
440
441 --visible-label
442 Include old and new filenames (or labels set with "--label" option)
443 as visible output.
444
445 --flatten
446 Replace "\input" and "\include" commands within body by the content
447 of the files in their argument. If "\includeonly" is present in
448 the preamble, only those files are expanded into the document.
449 However, no recursion is done, i.e. "\input" and "\include"
450 commands within included sections are not expanded. The included
451 files are assumed to
452 be located in the same directories as the old and new master
453 files, respectively, making it possible to organise files into old
454 and new directories. --flatten is applied recursively, so inputted
455 files can contain further "\input" statements.
456
457 Use of this option might result in prohibitive processing times for
458 larger documents, and the resulting difference document no longer
459 reflects the structure of the input documents.
460
461 --help or -h
462 Show help text
463
464 --version
465 Show version number
466
467 Predefined styles
468 Major types
469 The major type determine the markup of plain text and some selected
470 latex commands outside floats by defining the markup commands
471 "\DIFadd{...}" and "\DIFdel{...}" .
472
473 "UNDERLINE"
474 Added text is wavy-underlined and blue, discarded text is
475 struck out and red (Requires color and ulem packages).
476 Overstriking does not work in displayed math equations such
477 that deleted parts of equation are underlined, not struck out
478 (this is a shortcoming inherent to the ulem package).
479
480 "CTRADITIONAL"
481 Added text is blue and set in sans-serif, and a red footnote
482 is created for each discarded piece of text. (Requires color
483 package)
484
485 "TRADITIONAL"
486 Like "CTRADITIONAL" but without the use of color.
487
488 "CFONT" Added text is blue and set in sans-serif, and discarded text
489 is red and very small size.
490
491 "FONTSTRIKE"
492 Added tex is set in sans-serif, discarded text small and
493 struck out
494
495 "CCHANGEBAR"
496 Added text is blue, and discarded text is red. Additionally,
497 the changed text is marked with a bar in the margin (Requires
498 color and changebar packages).
499
500 "CFONTCHBAR"
501 Like "CFONT" but with additional changebars (Requires color
502 and changebar packages).
503
504 "CULINECHBAR"
505 Like "UNDERLINE" but with additional changebars (Requires
506 color, ulem and changebar packages).
507
508 "CHANGEBAR"
509 No mark up of text, but mark margins with changebars
510 (Requires changebar package).
511
512 "INVISIBLE"
513 No visible markup (but generic markup commands will still be
514 inserted.
515
516 "BOLD" Added text is set in bold face, discarded is not shown.
517
518 "PDFCOMMENT"
519 The pdfcomment package is used to underline new text, and
520 mark deletions with a PDF comment. Note that this markup
521 might appear differently or not at all based on the pdf
522 viewer used. The viewer with best support for pdf markup is
523 probably acroread. This style is only recommended if the
524 number of differences is small.
525
526 Subtypes
527 The subtype defines the commands that are inserted at the begin and end
528 of added or discarded blocks, irrespectively of whether these blocks
529 contain text or commands (Defined commands: "\DIFaddbegin, \DIFaddend,
530 \DIFdelbegin, \DIFdelend")
531
532 "SAFE" No additional markup (Recommended choice)
533
534 "MARGIN" Mark beginning and end of changed blocks with symbols in the
535 margin nearby (using the standard "\marginpar" command - note
536 that this sometimes moves somewhat from the intended
537 position.
538
539 "COLOR" An alternative way of marking added passages in blue, and
540 deleted ones in red. (It is recommeneded to use instead the
541 main types to effect colored markup, although in some cases
542 coloring with dvipscol can be more complete, for example with
543 citation commands).
544
545 "DVIPSCOL"
546 An alternative way of marking added passages in blue, and
547 deleted ones in red. Note that "DVIPSCOL" only works with the
548 dvips converter, e.g. not pdflatex. (it is recommeneded to
549 use instead the main types to effect colored markup, although
550 in some cases coloring with dvipscol can be more complete).
551
552 "ZLABEL" can be used to highlight only changed pages, but requires
553 post-processing. It is recommend to not call this option
554 manually but use "latexdiff-vc" with "--only-changes" option.
555 Alternatively, use the script given within preamble of diff
556 files made using this style.
557
558 "ONLYCHANGEDPAGE"
559 also highlights changed pages, without the need for post-
560 processing, but might not work reliably if there is floating
561 material (figures, tables).
562
563 "LABEL" is similar to "ZLABEL", but does not need the zref package
564 and works less reliably (deprecated).
565
566 Float Types
567 Some of the markup used in the main text might cause problems when used
568 within floats (e.g. figures or tables). For this reason alternative
569 versions of all markup commands are used within floats. The float type
570 defines these alternative commands.
571
572 "FLOATSAFE"
573 Use identical markup for text as in the main body, but set
574 all commands marking the begin and end of changed blocks to
575 null-commands. You have to choose this float type if your
576 subtype is "MARGIN" as "\marginpar" does not work properly
577 within floats.
578
579 "TRADITIONALSAFE"
580 Mark additions the same way as in the main text. Deleted
581 environments are marked by angular brackets \[ and \] and the
582 deleted text is set in scriptscript size. This float type
583 should always be used with the "TRADITIONAL" and
584 "CTRADITIONAL" markup types as the \footnote command does not
585 work properly in floating environments.
586
587 "IDENTICAL"
588 Make no difference between the main text and floats.
589
590 Configuration Variables
591 "ARRENV" If a match to "ARRENV" is found within an inline math
592 environment within a deleted or added block, then the inlined
593 math is surrounded by "\mbox{"..."}". This is necessary as
594 underlining does not work within inlined array environments.
595
596 [ Default: "ARRENV"="(?:array|[pbvBV]matrix)"
597
598 "COUNTERCMD"
599 If a command in a deleted block which is also in the textcmd
600 list matches "COUNTERCMD" then an additional command
601 "\addtocounter{"cntcmd"}{-1}", where cntcmd is the matching
602 command, is appended in the diff file such that the numbering
603 in the diff file remains synchronized with the numbering in
604 the new file.
605
606 [ Default: "COUNTERCMD"="(?:footnote|part|section|subsection"
607 ...
608
609 "|subsubsection|paragraph|subparagraph)" ]
610
611 "FLOATENV"
612 Environments whose name matches the regular expression in
613 "FLOATENV" are considered floats. Within these environments,
614 the latexdiff markup commands are replaced by their FL
615 variaties.
616
617 [ Default: "(?:figure|table|plate)[\w\d*@]*" ]
618
619 "ITEMCMD" Commands representing new item line with list environments.
620
621 [ Default: \"item" ]
622
623 "LISTENV" Environments whose name matches the regular expression in
624 "LISTENV" are list environments.
625
626 [ Default: "(?:itemize|enumerate|description)" ]
627
628 "MATHENV","MATHREPL"
629 If both \begin and \end for a math environment (environment
630 name matching "MATHENV" or \[ and \]) are within the same
631 deleted block, they are replaced by a \begin and \end
632 commands for "MATHREPL" rather than being commented out.
633
634 [ Default: "MATHENV"="(?:displaymath|equation)" ,
635 "MATHREPL"="displaymath" ]
636
637 "MATHARRENV","MATHARRREPL"
638 as "MATHENV","MATHREPL" but for equation arrays
639
640 [ Default: "MATHARRENV"="eqnarray\*?" ,
641 "MATHREPL"="eqnarray" ]
642
643 "MINWORDSBLOCK"
644 Minimum number of tokens required to form an independent
645 block. This value is used in the algorithm to detect changes
646 of complete blocks by merging identical text parts of less
647 than "MINWORDSBLOCK" to the preceding added and discarded
648 parts.
649
650 [ Default: 3 ]
651
652 "PICTUREENV"
653 Within environments whose name matches the regular expression
654 in "PICTUREENV" all latexdiff markup is removed (in
655 pathologic cases this might lead to inconsistent markup but
656 this situation should be rare).
657
658 [ Default: "(?:picture|DIFnomarkup)[\w\d*@]*" ]
659
660 "SCALEDELGRAPHICS"
661 If "--graphics-markup=both" is chosen, "SCALEDELGRAPHICS" is
662 the factor, by which deleted figures will be scaled (i.e. 0.5
663 implies they are shown at half linear size).
664
665 [ Default: 0.5 ]
666
668 Citations result in overfull boxes
669 There is an incompatibility between the "ulem" package, which
670 "latexdiff" uses for underlining and striking out in the
671 UNDERLINE style, the default style, and the way citations are
672 generated. In order to be able to mark up citations properly,
673 they are enclosed with an "\mbox" command. As mboxes cannot
674 be broken across lines, this procedure frequently results in
675 overfull boxes, possibly obscuring the content as it extends
676 beyond the right margin. The same occurs for some other
677 packages (e.g., siunitx). If this is a problem, you have two
678 possibilities.
679
680 1. Use "CFONT" type markup (option "-t CFONT"): If this
681 markup is chosen, then changed citations are no longer marked
682 up with the wavy line (additions) or struck out (deletions),
683 but are still highlighted in the appropriate color, and
684 deleted text is shown with a different font. Other styles not
685 using the "ulem" package will also work.
686
687 2. Choose option "--disable-citation-markup" which turns off
688 the marking up of citations: deleted citations are no longer
689 shown, and added citations are shown without markup. (This
690 was the default behaviour of latexdiff at versions 0.6 and
691 older)
692
693 For custom packages you can define the commands which need to
694 be protected by "\mbox" with "--append-mboxsafecmd" and
695 "--excludemboxsafecmd" options (submit your lists of command
696 as feature request at github page to set the default
697 behaviour of future versions, see section 6)
698
699 Changes in complicated mathematical equations result in latex
700 processing errors
701 Try options "--math-markup=whole". If even that fails, you
702 can turn off mark up for equations with "--math-markup=off".
703
704 How can I just show the pages where changes had been made
705 Use options -"-s ZLABEL" (some postprocessing required) or
706 "-s ONLYCHANGEDPAGE". "latexdiff-vc --ps|--pdf" with
707 "--only-changes" option takes care of the post-processing for
708 you (requires zref package to be installed).
709
711 Option allow-spaces not implemented entirely consistently. It breaks
712 the rules that number and type of white space does not matter, as
713 different numbers of inter-argument spaces are treated as significant.
714
715 Please submit bug reports using the issue tracker of the github
716 repository page https://github.com/ftilmann/latexdiff.git, or send them
717 to tilmann -- AT -- gfz-potsdam.de. Include the version number of
718 latexdiff (from comments at the top of the source or use --version).
719 If you come across latex files that are error-free and conform to the
720 specifications set out above, and whose differencing still does not
721 result in error-free latex, please send me those files, ideally edited
722 to only contain the offending passage as long as that still reproduces
723 the problem. If your file relies on non-standard class files, you must
724 include those. I will not look at examples where I have trouble to
725 latex the original files.
726
728 latexrevise, latexdiff-vc
729
731 latexdiff does not make use of external commands and thus should run on
732 any platform supporting Perl 5.6 or higher. If files with encodings
733 other than ASCII or UTF-8 are processed, Perl 5.8 or higher is
734 required.
735
736 The standard version of latexdiff requires installation of the Perl
737 package "Algorithm::Diff" (available from www.cpan.org -
738 http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15) but a stand-alone
739 version, latexdiff-so, which has this package inlined, is available,
740 too. latexdiff-fast requires the diff command to be present.
741
743 Version 1.2.1 Copyright (C) 2004-2017 Frederik Tilmann
744
745 This program is free software; you can redistribute it and/or modify it
746 under the terms of the GNU General Public License Version 3
747
748 Contributors of fixes and additions: V. Kuhlmann, J. Paisley, N.
749 Becker, T. Doerges, K. Huebner, T. Connors, Sebastian Gouezel and many
750 others. Thanks to the many people who sent in bug reports, feature
751 suggestions, and other feedback.
752
753
754
755perl v5.18.2 2017-06-22 LATEXDIFF(1)