Skip to content

fix: honor explicit limits in text style#69

Merged
erweixin merged 1 commit into
erweixin:mainfrom
techwizrd:fix-explicit-limits-inline
May 11, 2026
Merged

fix: honor explicit limits in text style#69
erweixin merged 1 commit into
erweixin:mainfrom
techwizrd:fix-explicit-limits-inline

Conversation

@techwizrd

Copy link
Copy Markdown
Contributor

Summary

  • Fixes Explicit \limits is ignored in inline math #67 by honoring explicit \limits in inline/text-style math.
  • Preserves explicit \limits / \nolimits parser metadata so layout can distinguish user-requested limits from default operator behavior.
  • Adds parser, layout, and golden KaTeX-vs-RaTeX regression coverage for text-style \sum limits.

Testing

  • cargo build --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • cargo test -p ratex-render golden_test_pass_rate
  • cargo test -p ratex-svg --features standalone --test golden_svg golden_svg_main_pass_rate

Golden scores for new cases:

  • 0997 \textstyle\sum_{n=1}^{\infty}: 0.750
  • 0998 \textstyle\sum\limits_{n=1}^{\infty}: 0.702

@erweixin

Copy link
Copy Markdown
Owner

Looks great to me. Thanks for your help!

@erweixin
erweixin merged commit 427fc41 into erweixin:main May 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explicit \limits is ignored in inline math

2 participants