TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to mark the parts of my document that have changed since the last revision with vertical bars in the margin. Is there a package to help with this?

Is there a tool that can compare two files and automatically add bars in the appropriate places, or do I have to insert markup manually?

share|improve this question

Marking changes:

  • the changebar package allows marking changes by bars. Not automatically, it has to be done by commands:\cbstart and \cbend. Change may can be nested within each other and with other environments, they can be colored and can cross page boundaries.
  • the chbar package is an alternative for plain TeX.

Comparing files:

  • Since LaTeX files are text documents you could use any diff tool comparing txt files and printing out the differences.
share|improve this answer

See latexdiff on ctan:

Latexdiff is a Perl script for visual mark up and revision of significant differences between two latex files. Various options are available for visual markup 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.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.