[Tex/LaTex] Accepting changes in Track changes package

trackchanges

Am using Track Changes package in my latex document. Got the package from here

To use this package \usepackage{trackchanges} and
Latex document will be Robinson, \change[ym]{new}{old}, \add[novi]{Thing 1 \& Thing 2, }\add[ym]{Humpty Dumpty}

To accept all the changes \usepackage[finalnew]{trackchanges}.
Accepting changes will be reflected only in PDF output.

Now my question is, Is there any way to remove all the track changes tags in latex document too?

Expectation: Accepting changes in both PDF output and in latex document(i.e.without track change tags(\add or \change etc..))

Latex document should be like Robinson, new, Thing 1 \& Thing 2, Humpty Dumpty

Best Answer

I have found a python program called acceptchanges.py in Track Changes package itself. I executed python acceptchanges.py --infile=input.tex --outfile=output.tex -c in the command line and got the latex document without the Track changes tags.

Related Question