Examples
Texchanges supports two complementary workflows. Use explicit review markup when decisions belong in the LaTeX source, or use automatic latexdiff to compare two complete revisions.
Explicit review
Section titled “Explicit review”The explicit review example keeps additions, removals, replacements, and decisions in one LaTeX source file. Change \texchangesexamplemode to compile the same source for review, final, or original reading.
Source: texchanges-explicit-review.tex · Overleaf instructions
Interactive walkthrough
Explicit review studio
Choose a stage to inspect it, compare two stages, or read the source that produces the example.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\providecommand{\texchangesexamplemode}{review}
\usepackage[\texchangesexamplemode]{texchanges}
\txdefineauthor[name=Reviewer,color=orange]{reviewer}
\title{Texchanges Explicit Review}
\author{Example Author}
\date{}
\begin{document}
\maketitle
\section{Introduction}
Hello \txreplace[author=reviewer,id=R1]{World}{research community}.
This paragraph contains \txadd{a newly proposed explanation}. It also contains
\txremove[author=reviewer,id=R2]{an unnecessary phrase} and a
\txhighlight[author=reviewer,id=R3]{claim to verify}.
\txcomment[author=reviewer,id=R4]{Add a citation supporting the final claim.}
The short API reads naturally too:
\replace{the method is human-like}{the method follows documented strategies}.
\txlistofchanges[style=compactsummary,title={Review summary}]
\end{document}
Automatic latexdiff
Section titled “Automatic latexdiff”The automatic diff example compares two complete revisions. Select texchanges-review.tex as the Overleaf Main document, then latexmkrc runs word-level latexdiff before pdfLaTeX compiles the generated review document. The example covers a removed word, phrase replacement, insertion, formatted text, and a revised list.
Sources: texchanges-original.tex, texchanges-revised.tex, latexmkrc · Overleaf instructions
Interactive walkthrough
Automatic latexdiff studio
Choose a stage to inspect it, compare two stages, or read the source that produces the example.
\documentclass{article}
\title{Texchanges Automatic Diff}
\author{Example Author}
\date{}
\begin{document}
\maketitle
\section{Introduction}
The new system provides a realistic representation of navigation.
The evaluation retains a descriptive summary for each route.
The prototype reports its findings clearly.
The model evaluates routes with \emph{fixed} landmarks.
\begin{itemize}
\item The interface announces the current turn.
\item The study records travel time.
\end{itemize}
\end{document}
\documentclass{article}
\title{Texchanges Automatic Diff}
\author{Example Author and Reviewer}
\date{}
\begin{document}
\maketitle
\section{Introduction}
The system provides selected characteristics of indoor navigation under partial observability.
The evaluation retains a concise summary for each route.
The prototype reports its findings clearly, with confidence intervals.
The model evaluates routes with \emph{adaptive} landmarks.
\begin{itemize}
\item The interface announces the next turn.
\item The study records travel time.
\item The reviewer verifies route completion.
\end{itemize}
\end{document}
# Select texchanges-review.tex as the Overleaf Main document to compile the
# automatic comparison. Other Main documents, including
# texchanges-explicit-review.tex, compile normally.
#
# MINWORDSBLOCK=1 preserves short shared phrases such as "system provides".
# -jobname=%B ensures the generated PDF has the name latexmk expects.
$pdflatex = q{if [ "%B" = "texchanges-review" ]; then latexdiff --flatten --type=UNDERLINE --config MINWORDSBLOCK=1 texchanges-original.tex texchanges-revised.tex > review-generated.tex; pdflatex -recorder %O -jobname=%B review-generated.tex; else pdflatex -recorder %O %S; fi};