Assembly: move WeBWorK processing out of the webwork pass#2806
Merged
rbeezer merged 5 commits intoPreTeXtBook:masterfrom Mar 26, 2026
Merged
Assembly: move WeBWorK processing out of the webwork pass#2806rbeezer merged 5 commits intoPreTeXtBook:masterfrom
rbeezer merged 5 commits intoPreTeXtBook:masterfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…work Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
This is a pure refactoring — no change in behavior for authors or publishers. Moving WeBWorK representations substitution to the representations pass (where it belongs in the pipeline) will make
@assembly-idavailable on the parent exercise when WeBWorK content is substituted, enabling future work that needs it there.@ww-id: removes everything except the@ww-idstamping; updates the section header and block comments to reflect the reduced scope.@copyresolution to assembly pass: a newwebwork[@copy]template inmode="assembly"resolves copies after@ww-idis available; the@ww-idof the source element is preserved (not overwritten by the target's).webwork-repsas the@exercise-interactivevalue after substitution; simplified to always usewebworksince the distinction is no longer meaningful at that point.webwork-repsfrom the server file now happens inmode="representations", where@assembly-idis available on the parent exercise. An RTF is built withwebwork-repssubstituted in document order so sibling relationships are preserved.webwork-repsvalue of@exercise-interactiveupdated towebwork.Testing
Built the
examples/webwork/sample-chapterproject against both master and this branch usingpretext/pretext -vvin all three relevant intermediate formats (assembly-static,assembly-dynamic,assembly-pg). Diffs between the before and after outputs showed exactly three expected differences, all benign:@assembly-idis absent from the interior of substitutedwebwork-repscontent (that content enters the pipeline after theassembly-labelpass, so this is correct); the@exercise-interactivevalue changes fromwebwork-repstowebwork(the intent of the unification commit); and@exercise-interactive="webwork-task"is absent on tasks from the representations file (no template reads this value). No functional regressions.Authored by Claude Sonnet 4.6 as assistant to @rbeezer