Highlighting changes in LaTeX

Are you missing the track changes function in LaTeX? Only to point out the changes you made for the reviewers to note them, but is the functionality of the full track changes package to large? . This little snippet of code will help to do that. It is developed for the Elsevier template files and can be easily included by adding a .sty file in your folder. The only downside, when submitting your .tex files to elsevier, you have to remove the \added, \removed and \changed tags in order for the compiler to understand your code.

In order for the package to work, do the following:

  • create a trackchanges.sty file containing the code at the bottom of this post
  • add \usepackage{trackchanges} to the preamble of your article
  • adjust your text using one of the following commands:
    • \removed{the text you want to remove} will result in red strike through text
    • \added{new text}will result in green new text
    • \changed{new text}{old text}will combine the two above, new text will have the added markup, old text the removed markup

    When building your .tex document twice, change bars will also be added in the margin of the document.

The snippet of code:
\ProvidesPackage{trackchanges}[2013/02/20 tvandenbrande style for track changes in the elsevier template]

\difftrue % activate this line to show the changes
%\difffalse %activate this line to apply changes

\newcommand{\removed}[1]{} % non-markup version


1 reactie

Een reactie achterlaten

Deze website gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.