3

I have learned from this thread "Track changes" in LaTeX that there do exists some change tracking mechanisms.

What I need now is more than change tracking but also change accepting similar to that in word.

enter image description here

There is a button in word that you can accept all changes and then the change tracking record will all gone from the doc only leaving the final draft. This is different from only showing the final draft.

I actually want to delete all tracking record at some point to progress to next version. So that you can start change tracking again and only show those "new" changes.

I know there are version control systems, but majority of my collages do not like them.

Is there any possible solution?

I feel if some pre-compile user-command can be supported this is possible. Here is what I mean: How to let latex only run one user defined command and save the ouput to a tax file

5
  • TeX is not the right tool for this (though I won't be surprised if/when complex solutions appear below). Have you heard of sed? (or awk?) They provide an easy way of 'filtering' out strings of text.
    – jon
    Apr 9, 2014 at 17:06
  • sed's regex matching does not support non-greedy match. And it is also sometimes hard to write a regex to match a command in latex. I wonder if there is any thrid-party latex macro (user-defined commmand) interpreter. If there is such thing. This would be a fair easily job, is'n it? Apr 9, 2014 at 17:11
  • The difficulty I see is in your requirement to "delete all tracking record". I am sure that the other requirement of "start change tracking again and only show those 'new' changes" could be handled without the need to actually delete the already accepted/rejected changes in the source code. BTW, I am not 100% sure that Word actually deletes it -- it may just no longer display it. Apr 9, 2014 at 17:19
  • You might want to have a look at the mechanisms, offered by a version control system. The most popular ones are presumably git and svn. With those tools you can view changes, merge them together, reject them, restore previous version and work with other people. You can also collaborate with people through websites like GitHub. Apr 9, 2014 at 17:54
  • But what command? Isn't this going to be something like \track{<some text>}..? (Admittedly, I haven't used track changes since about 2002 so I don't know how it works.) And, besides the fact that there are many examples on the web of how to twist sed into non-greedy matching, how non-greedy do you need it to be? In fact, with xparse, you could make each argument be delimited with a different delimiter, which would make things easier to parse...
    – jon
    Apr 9, 2014 at 17:56

1 Answer 1

1

I don't know exactly what you need on the LaTeX side, but there is at least one package that seems to do what you ask.

There is a package called changes that provides markup of changes. It can be loaded with the option [final] and it will supress the display of deleted text and print the changes normally. Unfortunately, this will sometimes generate multiple spaces where one would not want them. This can be gotten around by moving spaces inside the deleted material, but it is an annoyance.

The changes package comes with a bash script that will remove the markup from the tex source file, accepting all changes. That script is supposed to optionally prompt whether to accept each change. Unfortunately, I can't get the interactive prompt to work (in windows with a bash from MSYS). Also, if a deleted markup takes up a whole line, the script leaves a blank line, which is usually not what one wants.

The problems with the script and with the final option seem as if they should be correctable, but I am not a bash programmer, and it would take a considerable amount of effort for me to track down exactly what part of changes.sty is responsible for the extra spaces.

Even with these problems, the package might still be useful, depending on exactly what one wants to accomplish.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .