[Tex/LaTex] Compile PDFLATEX document with and without track changes

trackchanges

Reviewers frequently request some clarifications which we add in the text. Journals frequently require to submit two versions of the revised manuscript, with changes highlighted (in red) and with changes but for production, so no highlighting.

I wonder if I can somehow add a switch to the document so when I compile it, say with the switch to "on", I get the changes in red, and when the switch is off, the changes are there, but not highlighted red.

Is it possible?

Best Answer

I want to suggest the package changes. It's very powerful.

Example

\documentclass{article}
\usepackage[authormarkup=superscript,]{changes}
\definechangesauthor[name={TMOTTM},color=red]{TT}

\begin{document}
This is some filling text. 

This is more filling text with a \replaced[id=TT, ]{bad}{nice} font

\end{document}

Result:

enter image description here

This is the draft version. The package offers the possibility to add also a list of changes. Instead of replacing you can also add material by \added.

If you want to print the final version you can simply add the option final to the package.

\documentclass{article}
\usepackage[authormarkup=superscript,final]{changes}
\definechangesauthor[name={TMOTTM},color=red]{TT}

\begin{document}
This is some filling text. 

This is more filling text with a \replaced[id=TT, ]{bad}{nice} font

\end{document}

Now the result is:

enter image description here

Related Question