Repository navigation
WIP: tex-boxes (KC-107, paused) - #92
Merged
Merged
Conversation
New crate crates/tex-boxes: scaled arithmetic and units (tex.web 99-109, 453-458), node model, badness/hpack/vpackage with exact over/underfull report text (108, 644-678), show_box/short_display (173-198), shipout positions with cur_g/cur_glue rounding and leaders (619-637), a primitive box engine (nest, save stack, box contexts, vtop, lastbox, unpackage, vcenter, single-line paragraph hook), and the latex.ltx box layer (makebox/framebox/fbox/raisebox/parbox/minipage/rule/hspace/vspace/ phantom/smash/laps/savebox/settodim/lrbox). Oracle generator, 151 fixtures and generated expected.txt; DSL-driven oracle test not yet run. Implementation-Agent: Claude Opus 5 (subagent kabir-claude KC-107, mac-m5pro-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
Merged
Contributor
Author
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.
KC-107 is paused to save plan usage. Everything is in the new crate
crates/tex-boxes; nothing outside it was changed.Done (commit 4afd56f)
scaled.rs: scaled-point arithmetic from tex.web §§99–109 (round_decimals,print_scaled,xn_over_d,nx_plus_y) and unit conversion (§§453–458).node.rs: the node model. Covers char/ligature (opaque metrics trait), boxes, rules with running dimensions, glue at all four orders withzero_gluetracking, kerns, margin kerns, penalties, math, disc, whatsit, mark, insert and adjust nodes.pack.rs:badness(§108),hpackandvpackage(§§649–678). Over/underfull/tight/loose reports reproduce TeX's transcript text, including the overfull rule andadjust_tail.display.rs:show_boxandshort_display(§§173–198), with a printer that tracksfile_offsetso line breaks in the log come out the same.shipout.rs: positions fromhlist_out/vlist_out(§§619–637), including the accumulatedcur_g/cur_gluerounding and a/c/x leaders.engine.rs: a primitive-level box engine. It has TeX's nest, save stack,eq_define/geq_definefor box and other registers, box contexts (setbox, shift, shipout, leaders),\vtop(§1087),\boxmaxdepth,\lastbox, un-box commands,\unskip/\unkern/\unpenalty,\wd/\ht/\dp,append_to_vlist,\vadjust, a minimal\vcenter, aLineBreakerhook (single-line default) and aPageBuilderhook.latex.rs: the box commands as defined in latex.ltx (line numbers cited). Covers mbox, makebox, framebox, fbox, raisebox, parbox, minipage, rule, hspace(), vspace(), strut, the phantoms, smash, llap/rlap/clap, centering/raggedright/raggedleft, sbox/savebox/usebox, settowidth/height/depth and lrbox.tests/oracle/:generate.pyruns pdflatex and captures\showbox, log diagnostics and\pdfsavepospositions.fixtures.txthas 151 fixtures, 92 of them with position markers.expected.txtis generated output.tests/oracle.rsplus the DSL interpreter intests/dsl/mod.rs.Oracle status
axisheightinexpected.txtis 0, because math fonts weren't loaded when it was written.generate.pyis already fixed but was not re-run.! Missing } inserted.in pdflatex. Their expected data is not trustworthy. Likely causes:\vspace*/\hrulein horizontal mode, or a\vtop/\vboxfixture body; start from log lines around 3024–4249.g_*) will show it.Next steps to resume
cd crates/tex-boxes && CARGO_BUILD_JOBS=2 cargo testand fix compile errors intests/dsl/mod.rsandtests/oracle.rs.python3 tests/oracle/generate.py --keep, thengrep -n '^! ' <kept dir>/oracle.log | grep -v OK. Fix or remove fixtures that raise TeX errors until the log has none, then regenerate.CONTRACT.md: how compiler/render-pipeline adopt the crate, how KC-101 drivesBoxEngine, how KC-106 plugs in viaPageBuilder, and how KC-102 plugs in viaLineBreakerand the expansion hook.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu