最简单比较两个文档可以用latexdiff
latexdiff origin.tex modify.tex > diff.tex
再利用TrackChanges 下载地址:sourceforge.net AGU 默认压缩包里自带
最后测试虽然报错,但是可以使用footnotes,inline; margins,adjustmargins有问题自动断行
The trackchanges.sty style file adds five new LaTeX comands commands:
\note[editor]{The note}
\annote[editor]{Text to annotate}{The note}
\add[editor]{Text to add}
\remove[editor]{Text to remove}
\change[editor]{Text to remove}{Text to add}
\refneeded[editor]{Text}
\noindent\\
In all cases [editor] can be ommitted.
All of the TrackChanges commands allow for the specification of an editor. Specifing an editor will prefix the edits with the editor name and color code their changes in the final pdf or dvi file.
To specify an editor name, the editor must first be declared in the preamble:
\addeditor{editor one}
\addeditor{editor two}
Display Options
Track changes has a number of different ways that it can display the edits in the final dvi or pdffile.
finalold - Reject all edits.
finalnew - Accept all edits.
footnotes - Display edits as footnotes.
margins - Display edits as margin notes.
inline - Display edits inline.
See the Documentation for additional options.
Examples with the differnt display options can be found on the Preview page.
相关trackchanges-package 的问题
facing-problem-with-trackchanges-package
TrackChanges inside figure caption
Accepting changes in Track changes package
python acceptchanges.py --infile=input.tex --outfile=output.tex -c
Accept changes You can now accept the changes in a step-by-step manner in the source code or remove our comments.Alternatively, all changes can be either accepted (finalnew) or hidden (finalold) in the final document using two parameters, without having to remove them from the source code.
\usepackage[finalold]{../trackchanges}
\usepackage[finalnew]{../trackchanges}
In addition, a script of the style definition available on the author's side automatically applies to all changes in the source code.
change tracking commands have issues with citations
also we can use changes package
\documentclass{article}
\usepackage{changes}
\usepackage{lipsum}% <- For dummy text
\definechangesauthor[name={Per cusse}, color=orange]{per}
\setremarkmarkup{(#2)}
\begin{document}
\lipsum[1-7]
This is \added[id=per,remark={we need this}]{new} text.
This is \added[id=per,remark={has to be in it}]{new} text.
This is \deleted[id=per,remark=obsolete]{unnecessary}text.
This is \replaced[id=per]{nice}{bad} text.
This is \added[remark={we need this}]{new} text.
This is \added[remark={has to be in it}]{new} text.
This is \deleted[remark=obsolete]{unnecessary}text.
This is \replaced{nice}{bad} text.\listofchanges\end{document}