Here's one possible solution that will draw the squiggly line and admits page breaks (well, one at most) in the affected paragraph(s); all you have to do is to enclose the desired paragraph(s) inside \Startsquiggly
, \Endsquiggly
:
\documentclass{article}
\usepackage{refcount}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,calc}
\usepackage{lipsum}
\newcounter{tmp}
\newcommand\tikzmark[1]{%
\tikz[overlay,remember picture] \node (#1) {};}
\newcommand\Startsquiggly{%
\stepcounter{tmp}%
\tikzmark{a}\label{a\thetmp}%
\ifnum\getpagerefnumber{a\thetmp}=\getpagerefnumber{b\thetmp} \else
\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]
let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in
( $ (\x3,\y1) + (.55\textwidth,0) $ ) -- ( $ (\x3,\y3) + (0.55\textwidth,-0.5\textheight) $ );
\end{tikzpicture}%
\fi%
}
\newcommand\Endsquiggly{%
\tikzmark{b}\label{b\thetmp}
\ifnum\getpagerefnumber{a\thetmp}=\getpagerefnumber{b\thetmp}
\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]
let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in
( $ (\x3,\y1) + (.55\textwidth,0) $ ) -- ( $ (\x3,\y2) + (.55\textwidth,0) $ );
\end{tikzpicture}%
\else
\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={coil,aspect=0},decorate,ultra thick,gray]
let \p1 = (a.north), \p2 = (b), \p3 = (current page.center) in
( $ (\x3,\y3) + (.55\textwidth,.5\textheight) $ ) -- ( $ (\x3,\y2) + (.55\textwidth,0) $ );
\end{tikzpicture}%
\fi
}
\newcommand\Squ[1]{\Startsquiggly#1\Endsquiggly}
\begin{document}
\begin{itemize}
\item \lipsum*[1]
\item \Startsquiggly\lipsum*[1]\Endsquiggly
\item \lipsum*[1]
\item \Startsquiggly\lipsum*[1]\Endsquiggly
\end{itemize}
\end{document}
The code might need two or three runs for the lines to stabilize.
You can process your TeX files with the Perl program latexdiff
that is included with most LaTeX distributions.
From the manual:
Briefly, latexdiff is a utility program to aid in the management of
revisions of latex documents. It compares two valid latex files, here
called old.tex and new.tex, finds significant differences between them
(i.e., ignoring the number of white spaces and position of line
breaks), and adds special commands to highlight the differences.
Best Answer
Marking changes:
\cbstart
and\cbend
. Change may can be nested within each other and with other environments, they can be colored and can cross page boundaries.Comparing files: