MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

`\sqrt` with index of radical exceeds two digits display incorrect on v3.2.2

Open azurechen opened this issue 1 year ago • 2 comments

Issue Summary

When using the sqrt syntax but the index of radical exceeds two digits, the offset of expression is incorrect.

For example

aa\sqrt[33333]{a^{15}} + \sqrt[33333]{a^{15}}aa

Steps to Reproduce:

  1. Go to the demo page provided by MathJax-demos-web
  2. input aa\sqrt[33333]{a^{15}} + \sqrt[33333]{a^{15}}aa and click Render TeX
image

The correct result should be displayed like the following image (the output is HTML, which means the issue is only on SVG)

image

After investigation, this is a bug caused by the following line. Seems like adding an extra dx value accidentally.

https://github.com/mathjax/MathJax-src/commit/5f6cc8a78092f6b7b0849deb0e57002a61e7953d#diff-21adda599dc0790184ec7dfa4cb615b263b9a91917f3386bc62d8730460548acR356 (Downgrading to v3.2.0 can fix this issue because the pr was not merged yet)

Remove this line, and the expression is displayed correctly.

I also create a PR to fix the issue https://github.com/mathjax/MathJax-src/pull/1098

Technical details:

  • MathJax Version: 3.2.2
  • Client OS: Mac OS X 114.4.1
  • Browser: Chrome 125.0.6422.113

azurechen avatar Jun 02 '24 21:06 azurechen

link to PR mathjax/MathJax-src#1098

azurechen avatar Jun 02 '24 21:06 azurechen

This is a duplicate of #2923, #2984, and #3117, and is resolved in v4 (now in beta release)

dpvc avatar Jun 03 '24 11:06 dpvc