The LaTeX changes package


Manual change markup
Ekkart Kleinod  • 

Overview

The changes-package allows the user to manually markup changes of text, such as additions, deletions, or replacements. Changed text is shown in a different color; deleted text is striked out. Additionally, text can be highlighted and/or commented. The package allows free definition of additional authors and their associated color. It also allows you to change the markup of changes, authors, highlights or comments.

Example for change markup. The package is an official LaTeX package, i.e. it is available via CTAN and is contained in the usual LaTexX distributions.

Markup

The package provides five commands for change markup and one for outputting a list of changes:

\added[id=<id>, comment=<comment>]{new text}
\deleted[id=<id>, comment=<comment>]{deleted text}
\replaced[id=<id>, comment=<comment>]{new text}{deleted text}
\highlight[id=<id>, comment=<comment>]{highlighted text}
\comment[id=<id>]{comment}
\listofchanges[style=<style>, title=<tile>, show=<type>]

Moreover, there are package options, commands for adapting the layout or for the definition of authors, etc. They are described in detail in the user manual.

New Text

New text is marked up with added:

\added[id=<id>, comment=<comment>]{new text}

Examples:

This is \added{new} text.
This is \added[comment=forgotten]{new} text.
This is \added[id=EK]{new} text.
This is \added[id=EK, comment={put it there}]{new} text.

Deleted Text

Deleted text is marked up with deleted:

\deleted[id=<id>, comment=<comment>]{deleted text}

Examples:

This is \deleted{bad} text.
This is \deleted[comment=obsolete]{bad} text.
This is \deleted[id=EK]{bad} text.
This is \deleted[id=EK, comment={What did I think?}]{bad} text.

Replaced Text

Replaced text is marked up with replaced:

\replaced[id=<id>, comment=<comment>]{new text}{deleted text}

Examples:

This is \replaced{new}{old} text.
This is \replaced[comment=meh]{new}{old} text.
This is \replaced[id=EK]{new}{old} text.
This is \replaced[id=EK, comment={sounds better}]{new}{old} text.

Highlighted Text

Highlighted text is marked up with highlight:

\highlight[id=<id>, comment=<comment>]{highlighted text}

Examples:

This is an \highlight{important} issue.
This is an \highlight[comment=yess]{important} issue.
This is an \highlight[id=EK]{important} issue.
This is an \highlight[id=EK, comment={Because I say so!}]{important} issue.

Comments

Comments are marked up with comment:

\comment[id=<id>]{comment}

Examples:

This is a commented\highlight{This!} issue.
This is a commented\highlight[id=EK]{Still unclear.} issue.

List Of Changes

The list of changes is printed with listofchanges:

\listofchanges[style=<style>, title=<title>, show=<type>]

Examples:

\listofchanges
\listofchanges[style=summary]
\listofchanges[title={My Changes}]
\listofchanges[show=highlight|comment, title={Commented and highlighted}]

Errors, Wishes, Improvements

If you want to participate, be it with error messages, discussions, feature wishes, or programming, please use one of the following options:

  1. via email (see email symbol in the footer)
  2. via issue tracker
  3. via programming in gitlab using pull requests