Ví dụ
Texchanges hỗ trợ hai quy trình bổ trợ cho nhau. Dùng đánh dấu review tường minh khi quyết định cần nằm trong mã nguồn LaTeX, hoặc dùng latexdiff tự động để so sánh hai bản sửa hoàn chỉnh.
Review tường minh
Phần tiêu đề “Review tường minh”Ví dụ explicit review giữ phần thêm, xóa, thay thế, và quyết định trong cùng một tệp nguồn LaTeX. Đổi \texchangesexamplemode để biên dịch cùng một nguồn thành bản review, bản final, hoặc bản original.
Mã nguồn: texchanges-explicit-review.tex · Hướng dẫn cho Overleaf
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}
latexdiff tự động
Phần tiêu đề “latexdiff tự động”Ví dụ automatic diff so sánh hai bản sửa hoàn chỉnh. Chọn texchanges-review.tex làm Main document trên Overleaf, khi đó latexmkrc sẽ chạy latexdiff ở mức từ trước khi pdfLaTeX biên dịch tài liệu review được sinh ra. Ví dụ này bao gồm một từ bị xóa, một cụm bị thay thế, một phần chèn thêm, văn bản có định dạng, và một danh sách được sửa.
Mã nguồn: texchanges-original.tex, texchanges-revised.tex, latexmkrc · Hướng dẫn cho Overleaf
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};