7

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?

TMOTTM
  • 425
  • 1
  • 4
  • 10

3 Answers3

6

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

Marco Daniel
  • 95,681
4

One option might be to import the document into LyX and edit it there. LyX has a built-in change tracking system. I have used it quite a bit for paper reworking and editors and shepherds where always pleased by the diff view it produces:

PDF with change tracking

This PDF output can be generated by a simple switch in the LyX GUI. (The default is to compile the final document without the highlighting of changes.)

The changes are also visualized inside the editor and over multiple authors, which is pretty useful if collaborating on a paper.

Lyx with change tracking

Daniel
  • 37,517
  • This might be useful but I want to accomplish something different. I want to be able to compile the document in two slightly different ways, depending on a switch. I want to be able to highlight all track changes with one command. Manually doing that is very inconvenient, because there are usually many. – TMOTTM Jun 09 '13 at 14:26
  • @TMOTTM: That's perfectly possible with LyX. I have clarified this in my anser. – Daniel Jun 09 '13 at 21:08
3

Latexdiff is a great solution for your problem: https://www.overleaf.com/learn/latex/Articles/Using_Latexdiff_For_Marking_Changes_To_Tex_Documents

Lisa
  • 41