[Tex/LaTex] Advice on an efficient method to strip out color tags from LaTeX

lyx

I have revised a manuscript in LyX, and as requested by the journal editor, coloured the new text in red.

Once I completed the revision I exported to LaTeX to do the final tweaking of the manuscript.

I now have a revised manuscript in pdf format with all changes marked up in red text.

The problem is that I also need a unmarked up version (with red text removed). I can remove the red coloring in the LyX file, but then need to re-export and re-tweak the entire document whenever I make a small change.

Because the color text was added in LyX I have \textcolor{red}{Words and more words} scattered all throughout the document.

Can someone give me a clue to an efficient way to strip out the \textcolor{red} tags and the corresponding {} throughout the Latex file?

I've tried searching online but have not managed to find an answer yet.

Best Answer

This does not solve your current problem (David's answer should work fine in this respect).

However, next time you need to highlight changes for your editor, remember that LyX has a pretty good built-in change tracking system: Just do your edits in change-tracking mode and you are done:

Lyx with change tracking

It's possible to have mark-ups for the changes in the PDF output, however, this is optional, so you could always also generate a plain PDF:

PDF with change tracking

Once you are finished, or if you editor has already approved some of your edits, you can make them "permanent" by accepting the respective change in LyX.

I have used this process in for a couple of journal and shepherded conference papers. The respective editors were always extremely happy with the highlighting

Related Question