diff --git a/crates/texrra-tex-core/src/render.rs b/crates/texrra-tex-core/src/render.rs index 4af613a..f931a86 100755 --- a/crates/texrra-tex-core/src/render.rs +++ b/crates/texrra-tex-core/src/render.rs @@ -1613,7 +1613,7 @@ impl Page { x + (base_box.width - sub_box.width).max(0) / 2, baseline + if Self::large_operator(base) { - 0 + -4 * 65_536 } else { math::intrinsic_depth(base, font) } diff --git a/docs/SCOPED_FIDELITY_GOAL.md b/docs/SCOPED_FIDELITY_GOAL.md index 76a32d5..0748654 100755 --- a/docs/SCOPED_FIDELITY_GOAL.md +++ b/docs/SCOPED_FIDELITY_GOAL.md @@ -215,3 +215,21 @@ The route fraction is 2.9 pt lower and 31.7 pt narrower than TeX. The vertical fix cannot be a denominator-only shift (it collides with the rule); the width difference is inside the fraction body. A correct fix needs fraction-body spacing/width, not just a y offset. + + +## Large-operator lower-limit spacing + +The remaining formula depth is dominated by the lower limits of the denominator +sums. Large-operator sub-limits now start 4 pt higher than before (the generic +script descent is unchanged). The formula text span moves: + +```text +before: y=170.3..195.5 +after: y=170.3..191.5 +TeX: y=170.3..188.5 +``` + +The existing `display_sum_limits_sit_close_to_the_operator` test still passes, +and the rendered equation has no rule/limit collision. Fidelity moves +0.8959 -> 0.8999. The fraction rule is still about 31 pt shorter than TeX, +which is a separate horizontal-density gap. diff --git a/docs/TEX_FIDELITY_BENCHMARK.md b/docs/TEX_FIDELITY_BENCHMARK.md index c4ee914..b7e7f2a 100755 --- a/docs/TEX_FIDELITY_BENCHMARK.md +++ b/docs/TEX_FIDELITY_BENCHMARK.md @@ -31,7 +31,7 @@ The current arXiv template comparison reports: ```text reference_pages 3, candidate_pages 3 reference_words 1243, candidate_words 1264 -word_sequence_ratio 0.8959 +word_sequence_ratio 0.8999 page 1 ink bbox: TeX [72, 79, 540, 721] route-D [71, 79, 540, 724] page 2 ink bbox: TeX [72, 36, 540, 748] route-D [71, 41, 540, 751] page 3 ink bbox: TeX [72, 36, 540, 748] route-D [71, 41, 540, 751]