Removes trackchanges from LaTeX
The LaTeX package trackchanges
is great! However, sometimes I want to quickly convert all the commands to plain LaTeX. This sometimes happens if I don't have trackchanges
installed somewhere, or if it's interfering with the wordcount. This is where this python script comes in!
This script does three things:
- Replaces
\add{foo}
withfoo
. - Deletes
\delete{bar}
. - Replaces
\change{foo}{bar}
withbar
.
Warning: This script will not proceed if the trackchanges
commands are invalid. I.e. if the curly brackets are unbalanced, this code will error.
Currently, this is used as a script on a plain .tex
file, e.g.
python untrackchanges.py file.tex
This will produce a new file with a .untrack
extension.
- Complete tests
- Add options for changes
- Add checking before computations
- Better file naming