True WYSIWYG LaTeX System
Windows     Mac     Linux  

Track Changes

Using latexdiff with BaKoMa TeX Word

latexdiff compares two latex files and marks up significant differences between them. See

TeXWord is exellent tool for editing latexdiff output.
Advanced integration allows launching latexdiff tools imediately from TeXWord.

ATTENTION: Only BaKoMa TeX 10.40 or later have special support for latexdiff.
NOTE: latexdiff must be installed properly before using by BaKoMa TeX. See Install of latexdiff under BaKoMa TeX

Using latexdiff

Accept/Decline changes using TeXWord

Primarily, latexdiff output may be directly opened by TeXWord and revised visually.
Any additions/deletions may be individually accepted or declined instantly.

Just open latexdiff output in TeXWord:

latexdiff -t CFONT document-draft.tex document-rev.tex >document-diff.tex
C:\BaKoMa TeX\BIN\WIN32\texword.exe document-diff.tex

TeXWord understands latexdiff markup commands. So, just click right mouse button (in Page Window) under markup insertions and deletions ... Appeared context menu (NOTE: selection must be absent) will have two additional commands:

for addition:
  • Accept addition [latexdiff]
  • Decline addition [latexdiff]
for deletion:
  • Accept deletion [latexdiff]
  • Decline deletion [latexdiff]

this context menu is appeared only for changes in document body (beween \begin{document} and \end{document}) So, for changes in document title defined in preamble these comamnd will not be appeared, because of association with \maketitle command.

'Edit > Changes [latexdiff] > Accept or Decline ...' menu command opens dialog which is more convenient for revision of long documents.

Click Next Change or Previous Change buttons to find changes.
Click Accept Change or Decline Change buttons to accept or ...

Accept/Decline All Cnages will run latexrevise
(if perl and latexdiff are available).

So, you can browse the document and accept or decline changes individually.

Launching latexdiff and latexrevise from TeXWord.

In advance, when TeXWord detects both latexdiff and perl installed on your computer it provides several commands for running latexdiff and latexrevise from program menu. All latexdiff commands are available from 'Edit > Changes [latexdiff] >' submenu.

'Edit > Changes [latexdiff] > Compare Document (with previous version)'
The command assumes that you have opened new document. In this reason, they ask you to open old version of document (using file openning dialog). Then, it launches latexdiff for these files and load result instead of currently opened document.

In result you will see changes in your document marked with different colors. Using explained above commans you can quickly accept or decline any modifications.

Finally, you can accept or decline rest of changes by 'Accept/Decline ALL changes' from menu or dialog.

Typical workflow ...

There is description of typical workflow which we keep in mind when develop our interface.
  • 'art-draft.tex' is draft of my article which
    I send to my boss (or editor, or coauthor, etc.) for revision.
    So, I just attach it to E-Mail which I send to boss.
  • 'art-rev.rex' is revision of my article which I have received from boss using E-Mail and I save under another name.
  • I open 'art-rev.tex' in TeXWord and look briefly.
    It is important that boss can already use latexdiff output. In this case, next item must be skipped.
  • So, if I see just revised latex document I run latexdiff using
    'Edit > Changes [latexdiff] > Compare Document (with previous version)' menu command.
    NOTE: In opened 'file open' dialog I select my original document 'art-draft.tex'.
    NOTE: 'art-rev.tex' is replaced by output from latexdiff. However, I remember that original version is in backup file and of cource in E-Mail sent me by my boss.
  • So, I see my document where changes of my boss are highlighted - deletions in red, and additions in blue.
    I browse throught document and exploring changes. For changes whose I want to accept or decline I click right mouse button and select proper option as explained in first section.
  • Finally, I must issue one of command:
    'Edit > Changes [latexdiff] > Accept All' or 'Edit > Changes [latexdiff] > Decline All'.
    to accept or decline rest of changes.

Installation of latexdiff under BaKoMa TeX

Installing Perl (MS Windows only)

NOTE: latexdiff requires perl 5.8 or later.

See which gives list of variants.
We recommend ActivePerl. However, you can choose any variant.
To install ActivePerl just download and install it.

BaKoMa TeX (on Windows) finds perl using association with *.PL files, which is associated by ActivePerl.
So, if BaKoMa TeX can't find your version of perl, you can try to associate perl.exe with PL file type.

Under Mac (OSX) and Linux Perl is already available.
BaKoMa TeX assumes perl path is /usr/bin/perl.

Installing latexdiff itself

Automatical Installation
When BaKoMa TeX can't find latexdiff you will see menu:

Edit > Changes [latexdiff] > latexdiff not found, click to install or for instructions

Just click it. Then TeXWord will download latexdiff distribution from CTAN
(or CTAN mirror selected in 'Options > Common Settings > Directories'),
install it into BaKoMa TeX user's directory tree ($TEXMFUSER) and rebuild menu.

NOTE: new functions will be appeared in 'Edit > Changes [latexdiff]' menu immediately.

Manual Installation into arbitrary TEXMF tree
Also, you can install latexdiff into another directory tree.

In general, you must:

  • Copy latexdiff files from any CTAN site or mirror (i.e.
    into the sub folder 'scripts\latexdiff' of any TEXMF tree (see list in 'Options > Common Settings > Directories')
  • Remake ls-R file in proper TEXMF tree (using [(Re)Build ls-R] button in 'Options > Common Settings > Directories')
    NOTE: if ls-R is absent just click [Reset Cache] button.

For example, under Windows you can install it into LOCAL folder:

  • Copy latexdiff files from any CTAN (i.e.
    into the folder C:\BaKoMa TeX\LOCAL\scripts\latexdiff
  • Remake ls-R file: Open dialog using the menu: 'Options > Common Settings > Directories,
    selects $TEXFMFLOCAL item (according to folder into which latexdiff has been copied) and click [(Re)Build ls-R] button.