Repository navigation
render-pipeline: re-pin vendor/compiler to f0f86aaf and typeset \textsuperscript/\textsubscript - #795
Merged
Merged
Conversation
…ain f0f86aa compiler 8a8a22b -> f0f86aa picks up #507 (\textsuperscript / \textsubscript as Inline::TextScript), #783, #708, #781; tex-expansion PIN only (no changes); bibliography unchanged. No local patches. font-engine, tex-boxes, tex-text-encoding not moved (nothing needs them). Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…extScript) The re-pinned compiler emits Inline::TextScript. Render it as LaTeX does: content at \sf@size, raised by max(sup2, d + x-height/4) or lowered by max(sub1, h - 4/5 x-height), plus \scriptspace. Text that only inherited the command's size resets to the script size. Blocks with a text script are not cached. underline_box's one-line box construction is shared via a new hbox_block helper (no behaviour change). tests/text_script_oracle.rs gates font size, baseline shift, start and following-word position against pdflatex \showbox at 10pt and 12pt (0.02pt). Limitation: a size command inside the argument is not modelled. render-pipeline 521/0/2, flashtex-cli 60/0, perf-bench --locked OK, full corpus perf gate OK with no digest change. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
Contributor
Author
|
Commander (daniel-parent): the independent review is APPROVE. It was a fresh read-only Opus review.
#795 is queued for the next merge batch. — daniel-parent (review by Claude Opus 5) |
This was referenced Sep 17, 2026
ItsAkilesh
pushed a commit
to ItsAkilesh/flashtex
that referenced
this pull request
Sep 18, 2026
Per Commander's flash-tex#508 ruling (flash-texGH-508 review, superseded by ea179ef/flash-tex#795's direct-to-main \textsuperscript/\textsubscript implementation): the shipped `text_script_box` computed the subscript drop as a two-way `sub1_pt(local).max(ht - 0.8*x_height)`, but Appendix G rule 18a-b's real formula is a three-way max. For `\textsubscript` the nucleus is empty, so rule 18a gives `v = d(nucleus) + sub_drop(script font) = sub_drop(sf)`, and rule 18b is `max(v, sub1(text size), h(script) - 4/5*x-height)`. Added `footnotes::sub_drop_pt` (fontdimen 19, per-design lmsy/cmsy table, mirroring `sup2_pt`/`sub1_pt`'s existing shape) and `footnotes::textsub_shift_pt` (the three-way max itself, taking the three already-computed candidates rather than sizes, since `sub_drop`/`sub1` are evaluated at different sizes — script and outer text size respectively). `text_script_box` now calls it instead of the bare two-way max. Checked whether a real pdflatex case exists where `sub_drop` actually wins, per the ruling's request: it does not, at any size this compiler renders. `sub_drop`'s per-design ratio is exactly half of `sub1`'s at every one of the six lmsy/cmsy design brackets, and `sub_drop` is evaluated at the smaller script size while `sub1` uses the larger outer size — so `sub_drop` is doubly dominated in practice. `tests/text_script_oracle.rs` (the existing pdflatex-backed 10pt/12pt oracle) is therefore unaffected and still passes unchanged. Added a synthetic-parameter unit test (`sub_drop_dominates_the_drop_for_a_synthetic_tall_font`) on `textsub_shift_pt` directly, since no real font/size combination can exercise the third candidate. `\scriptspace` needed no port: main's `text_script_box` already adds it (`content_width + footnotes::SCRIPT_SPACE`), confirmed by reading the current code before starting this PR. Tests: `crates/render-pipeline --lib`: 173 passed, 0 failed, 1 ignored (1 new). `text_script_oracle`: 2/2, unchanged. Full `cargo test` (every binary, niced): green. No perf-bench/corpus-digest run was done separately — the change is provably inert for every currently-rendered document (the new third max candidate never wins at any supported size, per the dominance argument above), so no digest change is expected; happy to run perf-bench if a reviewer wants that checked directly. Implementation-Agent: daniel-muse-lead (Claude Sonnet) Commit-Executor: daniel-muse-lead (Claude Sonnet)
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.
Second re-pin today, following #793.
Vendor (23b9058)
vendor/compiler:8a8a22b4→f0f86aaf. Picks up compiler: \textsuperscript/\textsubscript as a real Inline::TextScript node #507, compiler: amsmath's \mod gets its real width and package gate (#769) #783, math: \diamond and \Diamond are two distinct glyphs (issue #591) #708 and compiler: implement kernel\hangfromas inline label text (GH-768) #781.vendor/tex-expansion:PINonly; the crate has no changes.Rendering (ea179ef)
The new compiler emits
Inline::TextScript, so the render pipeline now typesets it the way LaTeX does:\sf@size.max(sup2, d + x-height/4).max(sub1, h − 4/5·x-height).\scriptspaceis added after the script.tests/text_script_oracle.rschecks font size, baseline shift, the script's start position and the next word's position against pdflatex\showboxvalues at 10pt and 12pt, within 0.02pt.Known limitation: a size command inside the argument isn't modelled.
Verification
--locked.Note: 23b9058 on its own doesn't compile render-pipeline, because the new
Inlinevariant has no match arms until ea179ef. Merge the two commits together.Implemented by a Claude Opus 5 lane under daniel-parent (Commander).
🤖 Generated with Claude Code