The TrackChanges stylefile allows multiple editors to make changes and add notes to a document. These changes and notes will be color coded and added to the compiled document.
The
trackchanges.sty style file adds five new LaTeX comands commands:
\note[editor]{The note}
\annote[editor]{Text to annotate}{The note}
\add[editor]{Text to add}
\remove[editor]{Text to remove}
\change[editor]{Text to remove}{Text to add}
In all cases
[editor] can be ommitted.
Display Options
TrackChanges has a number of different ways that it can display the edits in the final
dvi or
pdf file.
finalold
Ignore all of the edits.
The document will look as if the edits had not been added.
finalnew
Accept all of the edits.
Notes will not be shown in the final output.
footnotes
Added text will be shown inline. Removed text and notes will be shown as footnotes.
This is the default option.
margins
Added text will be shown inline. Removed text and notes will be shown in the margin.
Margin notes will be aligned with the edits when possible.
inline
All changes and notes will be shown inline.
Margin Options
These options are to be used with the
margins display style. They are used to make more space for the margin notes.
By default the margins are left as in the original document.
movemargins
Move the text over to the left hand side. The textwidth will stay the same.
adjustmargins
Reduce the textwidth and move the text over to the left hand side.
This option will produced the most space for the margin notes.
Note: For these margin options to work properly, the
\usepackage{trackchanges} command will have to come after any other packages or commands that adjust the margins.
Advanced Usage
Certain types of commands cannot be used inside of the TrackChanges edit
commands without special handling. For more details see the
limitations section.
The following option can be used to deal with incompatible commands.
ignoremode
Additional commands can be added to the ignore list with the following command.
\tcignore{command}{num args}{arg num to pass}
The last argument specifies which, if any, argument to pass as plain text
when the command is ignored. If the last argument is zero, then all of the
arguments will be ignored.
If
\color and
\textcolor were not already on the ignore list then the following commands
could be used to add them:
\tcignore{\textcolor}{2}{2}
\tcignore{\color}{1}{0}
TrackChanges also requires special handling for font changing
commands. These type of commands may have to be registered
with TrackChanges to be dealt with properly.
To register a new command use the following command.
\tcregister{command}{num args}
All of the standard font switching command are registered by
default. If
\bf and
\emph were not already registered then
the following commands could be used to add them:
\tcregister{\bf}{0}
\tcregister{\emph}{1}
While registering commands is primarily for font changing it may
work for other types of commands that are causing problems.
For more information see the documentation for the
soul package.
Limitations
-
If another package is used that adjusts the margins, it
can take precedence over the TrackChanges margin handling.
To make sure TrackChanges can adjust the margins correctly,
load it after any other packages or commands that adjust the margins.
-
TrackChanges cannot handle certain kinds of commands inside
the edit commands. In particular \color,
\textcolor and
any commands from the underlining package soul
will not work. There are two ways to get around these issues.
-
The ignoremode option can be used.
This will tell TrackChanges to ignore certain commands
(Including the ones mentioned above).
Additional commands can be added to the ignore list with
the \tcignore command.
See the Advanced Usage section
for more details.
-
Put \protect in front of
the problematic command. This will not always work, and
may cause strange behavior.
-
TrackChanges requires special handling for certain kinds of
commands inside of edit commands. These problematic commands
are generally font switching commands. All of the common
font switching commands (such as \emph,
\textbf, etc.)
are already handled. If you run into an issue you can try
using \tcregister to register the
problematic command.
-
TrackChanges is Incompatible with the package ulem
Use the package soul instead for underlining/strikeout.
-
Some other packages that take over footnote handling may be
incompatible with TrackChanges. Using a footnote package
such as footmisc may fix these problems.
-
Older versions of pdflatex have very poor
color handling. Color may not be retained across pages or even across
lines in certain cases.
Troubleshooting
TrackChanges can have problems dealing with certain commands inside
placed inside the edit commands. These problems can often produce
confusing error messages.
The
Limitations and
Advance Usage sections have information
on ways to get around these type of errors.