Make the Overleaf revision editable without losing the diff - #29
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overleaf compiles whichever open file contains
\documentclass, ignoring the Main document setting. The automatic-diff example asked reviewers to edittexchanges-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 --flattenexpands the\inputbefore diffing.Verified in a clean directory under Overleaf's own
-jobname=outputinvocation: 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;
shellcheckclean.