Use git for LaTeX


git can be a good tool to keep the history of the changes in LaTex files. The only difficult thing in using git for LaTeX is how to track the changes between commits. If one word in a paragraph is changed, git thinks that the whole paragraph is changed. One way to track changes precisely in git for LaTeX is to adhere to a good writing behavior such as to make each line contain only one sentence. Alternatively, we can use command git diff –color-words to highlight the changes between two commits by words. With that command, you can send the console output of the changes to a file. The generated file contains only ANSI codes for colors, which are used to highlight the changed words. To view these changes in a modern human readable manner, we need a tool to convert the ANSI code file to html, pdf, rtf or other popular portable file format. For this purpose, ansifilter is the right one.