Recently my survey was rejected and required minor revision, while I have to submit a revised article with the “editing mode” feature turned on. Because I use Miktex+Texstudio to edit my paper in windows 10, Latexdiff
is considered of course.
Latexdiff
is a Perl script for visual mark up and revision of significant differences between two LATEX files. Various options are available for visual mark up using standard LATEX packages such as color. Changes not directly affecting visible text, for example in formatting commands, are still marked in the LATEX source. A rudimentary revision facilility is provided by another Perl script, latexrevise, which accepts or rejects all changes. Manual editing of the difference file can be used to override this default behaviour and accept or reject selected changes only.
Step 1:
For a pure rookie, first of all, you need to install CTEX (for Chinese users) or Miktex.
Step 2:
Then, win+R
and open cmd
, input command latexdiff
, if returns
1 | 2 and only 2 non-option arguments required. Write latexdiff -h to get help |
Congrats! You have successfully installed latexdiff
and you can turn to Step 3.3.
Step 3:
Otherwise, don’t worry, I encountered the same situation as you. Do as follows.
3.1 Install Latexdiff
Package
After you install a Tex, open Start Menu->Ctex or Miktex->Package Manager (Admin)
.
Search Latexdiff
in column Name:
as follows
Click the +
button and install it.
3.2 Install Perl
Latexdiff
is a Perl
script, so you can go to Perl download corresponding version in your computer. Technically, ActivePerl
and StrawberryPerl
is both ok.
Same steps in Step 2, if you have problem as
1 | latexdiff: The Perl script could not be found. |
It’s a common problem and you can find the answer in
It is worth mentioning that if you have the following problem which confused me for a long time
1 | latexmk: the script engine could not be found |
Actually I have no idea how I successfully solve it. You may do the trials as what I have done.
- Check the System Path of
Perl
andTex
, especially according tox86
orx64
- Reinstall
Perl
, if not work, change toActivePerl
orStrawberryPerl
- Restart your windows after you make some changes
3.3 Latexdiff
Put your origin tex version (e.g., old.tex
) and your modified tex version (e.g., new.tex
) in a same file. cmd
to this path, and input
1 | latexdiff old.tex new.tex >diff.tex |
where diff.tex
is the editted version, add the required files to this path and compile it. Then you can have the results
If you encounter some errors in compiling, just google it because they are just some common LATEX errors. Enjoy.
!!!Tips: if you suffer any problem, first go to google or baidu it.
Please discover the truth by yourself.