I've written a script to diff latex files and then produce markup by adding green or red tcolorboxes around most types of content and special handle any cases where that doesn't work well (like table rows), which works great generally. Note: using latex diff wasn't practical for the content in the document I'm working on.
I've hit an issue with tables produced using the longtable environment (tabular and tabularx are fine). When the caption has been changed it is inserted into a tcolorbox, however I get the following error when trying to compile it using xelatex:
\caption ->\noalign
\bgroup \@ifnextchar [{\egroup \LT@c@ption \@firstofone ..
tabularx example (works)
\begin{table}[H]
\begin{tcolorbox}[on line,arc=0pt,outer arc=0pt,colback=green!10!white,colframe=green!50!black, boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt, boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, rightrule=0pt, leftrule=0pt]\caption{my caption}\end{tcolorbox}
\label{table:mycaption}
\begin{tabular}{|l|l|}
\hline
\rowcolor{table}
\textbf{Value} & \textbf{Description} \\ \hline
abc & waffle here \\ \hline
\rowcolor{green!10!white}"def" & new waffle here \\ \hline
\end{tabular}
\end{table}
longtable example (doesn't work)
\begin{longtable}{|l|l|l|p{2.77in}|}
\begin{tcolorbox}[on line,arc=0pt,outer arc=0pt,colback=green!10!white,colframe=green!50!black, boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt, boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt, rightrule=0pt, leftrule=0pt]\caption{my caption}\end{tcolorbox}
\label{table:mycaption}
\endfirsthead
\endhead
\hline
\rowcolor{table}
\textbf{Value} & \textbf{Description} \\ \hline
abc & waffle here \\ \hline
\rowcolor{green!10!white}"def" & new waffle here \\ \hline
\end{longtable}
\caption{my caption}
a referece to the Dead Poets Society?