Skip to content

Make the Overleaf revision editable without losing the diff - #29

Merged
phucnht merged 1 commit into
developfrom
feat/overleaf-editable-body
Sep 29, 2026
Merged

phucnht merged 1 commit into
developfrom
feat/overleaf-editable-body

Conversation

@phucnht

@phucnht phucnht commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Overleaf compiles whichever open file contains \documentclass, ignoring the Main document setting. The automatic-diff example asked reviewers to edit texchanges-revised.tex, which carries \documentclass, so recompiling with it open silently produced the plain revised document instead of the diff, behind whatever stale diff was still on screen.

The revision is now a wrapper plus texchanges-revised-body.tex, and the body is the file to edit: it has no \documentclass, so it can stay open while every recompile still produces the comparison. latexdiff --flatten expands the \input before diffing.

Verified in a clean directory under Overleaf's own -jobname=output invocation: the review document compiles with 22 diff markers and the wrapper still compiles standalone. The bundle (now eight files) and the CTAN archive carry the new file; make ctan's own from-archive compile passes with it.

The manual-testing checklist gains the step that would have caught the original trap (edit the body, recompile while it is open, the output must still be the diff), catches up with the suite count (23, not 22), and gains rows for the replay and diagnostics behaviour added since it was written.

Suite green at 23 cases locally; shellcheck clean.

…e diff

Overleaf compiles whichever open file contains \documentclass, ignoring
the Main document setting. The automatic-diff example asked a reviewer
to edit texchanges-revised.tex, which carries \documentclass, so the
moment they recompiled with that file open the output silently became
the plain revised document instead of the diff. The stale diff left on
screen from an earlier compile made the failure easy to miss.

The revision is now a thin wrapper holding \documentclass plus an
\input, and texchanges-revised-body.tex holds the text. The body has no
\documentclass, so it can stay open and edited while every recompile
still produces the comparison; latexdiff --flatten expands the \input
before diffing. Verified in a clean directory under Overleaf's own
-jobname=output invocation: the review document compiles with 22 diff
markers, and the wrapper still compiles standalone.

The bundle and the CTAN archive gain the new file, the example README
names which file to edit and why the split exists, and the manual
testing checklist gains the step that would have caught the original
trap: edit the body, recompile while it is open, and the output must
still be the diff. The checklist also catches up with the suite (23
cases, not 22) and gains rows for the replay and diagnostics behaviour
added since it was written.
@phucnht
phucnht merged commit cccb37a into develop Sep 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant