Issue Summary
In MathJax v4, \qquad\square sends typesetting into an infinite loop: the page never finishes rendering and the browser tab hangs / runs out of memory. \square on its own renders fine.
Steps to Reproduce:
- Load a page that loads MathJax v4 (
tex-chtml) with the minimal config below.
- Put
\(\qquad\square\) in the body.
- Open the page — it hangs during initial typesetting (tab becomes unresponsive / OOM).
\(\square\) or \(\qquad x\) alone render normally.
This is valid TeX that LaTeX typesets without issue, so MathJax should render it (or report an error) rather than hang indefinitely. I expected the QED box to render with the preceding space.
Technical details:
- MathJax Version: 4.1.2
- Client OS: Windows 11
- Browser: Brave (1.90.128) Chromium (148.0.7778.217)
I am using the following MathJax configuration:
and loading MathJax via
<script async src="https://cdn.jsdelivr.net/npm/mathjax@4.1.2/tex-chtml.js"></script>
Supporting information:
- No live link, but a complete minimal repro page:
<!doctype html><html><head><meta charset="utf-8">
<script>MathJax = {};</script>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@4.1.2/tex-chtml.js"></script>
</head><body>
<p>\(\qquad\square\)</p>
</body></html>
- Not a display issue — the tab hangs/OOMs before anything renders.
- Browser console shows no errors (it hangs before any are emitted).
Issue Summary
In MathJax v4,
\qquad\squaresends typesetting into an infinite loop: the page never finishes rendering and the browser tab hangs / runs out of memory.\squareon its own renders fine.Steps to Reproduce:
tex-chtml) with the minimal config below.\(\qquad\square\)in the body.\(\square\)or\(\qquad x\)alone render normally.This is valid TeX that LaTeX typesets without issue, so MathJax should render it (or report an error) rather than hang indefinitely. I expected the QED box to render with the preceding space.
Technical details:
I am using the following MathJax configuration:
and loading MathJax via
Supporting information: