4
$\begingroup$

In the course of a discussion involving using MathJax to re-define macros, I couldn't recall if MathJax obeys a \newcommand for an already-defined macro, and so made a draft post whose body was $\newcommand\div{Hi}$$\div$. This produced $Hi$, even though the default expansion of \div is $\div$. This, of course, is presumably by design, and is not the substance of my bug report.

What I noticed that was strange was that on some, but not every, refresh, the occurrences of \div in the comments, which were written long before my draft post, and which even precede my draft post on the page, changed from $\div$ to $Hi$. This seems like it should be impossible, after the change in scoping that meant that macro definitions in one post shouldn't affect another. Macro \div becomes Hi

I also cannot reliably reproduce this; it doesn't happen on every refresh, and further changing my draft post to other re-definitions doesn't seem to affect the uses of \div in the comments, which always render as either $\div$ or $Hi$. I suspect that the specific details of what's happening have to do with subtleties in the caching behaviour of my browser (Safari Version 15.2 (17612.3.6.1.6)), and, probably, with the different treatment parsing and MathJax treatment comments receive; but surely, whatever the browser is doing, one post still shouldn't be affecting macro definitions in other comments?

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .