MathJax
MathJax copied to clipboard
svg - unexpected \sqrt translated
Issue Summary
In $\sqrt[a]{b}$, display error will occur when length of a is at least 3. This only happens when using svg-output.
Steps to Reproduce:
- Create a file
a.htmlwith the following content
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>$a = a = \sqrt{n} = b$</p>
<p>$a = a = \sqrt[n]{n} = b$</p>
<p>$a = a = \sqrt[nn]{n} = b$</p>
<p>$a = a = \sqrt[nnn]{n} = b$</p>
<p>$a = a = \sqrt[nnnn]{n} = b$</p>
<p>$a = a = \sqrt[nnnnnnnnnnnnnnnn]{n} = b$</p>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$']]
},
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js" defer></script>
</body>
</html>
- Open it in any browser
Technical details:
- MathJax Version: 3.2.2
- MathJax Render: SVG
- Client OS: Windows 11
- Browser: Microsoft Edge 117.0.2045.60
Supporting information:

This was fixed in v4.
Note that v4 is out in beta release, so it will be fixed officially when the v4.0 final release is made.
Also, this is a duplicate of #2923 and #2984