MathJax
MathJax copied to clipboard
Referring to labels inside "split" or "aligned" environments seems broken
Issue Summary
It seems that referring to an equation which has it's label inside an aligned or split environment just generates (???)
Steps to Reproduce:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<title>Test</title>
<script>MathJax = { tex: { tags: 'all' } }; </script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
<body>
Test equation has number <span class="math inline">\(\eqref{test}\)</span>.
<span class="math display">\[\begin{aligned}E=mc^2 \label{test} \end{aligned}\]</span>
</body>
</html>
will render as

Moving the \label outside of the \aligned environment will generate the correct equation label
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<title>Test</title>
<script>MathJax = { tex: { tags: 'all' } }; </script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
<body>
Test equation has number <span class="math inline">\(\eqref{test}\)</span>.
<span class="math display">\[\begin{aligned}E=mc^2 \end{aligned} \label{test}\]</span>
</body>
</html>
will render as

The same happens when the \aligned environment is replaced by a \split environment.
Technical details:
- MathJax Version: 3.2
- Client OS: (e.g., Mac OS X 10.15.7)
- Browser: (e.g., Chrome 102.0.5005.115)
Thanks for the report. I will need to look into the issue.