A little over 4 years go I discovered that MathJax supports the $\LaTeX$ command \newcommand
, and started to use it in my own answers and questions: this makes certain repetitive things so much easier to write.
In the meantime I've done this in 171 answers, 4 questions, and 11 comments.
(As a side note, currently I'm mostly using these for making it easy to write proofs and calculations in a 'calculational style'; see, e.g., EWD1300. A gist which I use as a template is here.)
However, I've recently discovered that \newcommand
is not without its disadvantages: its scope is the rest of the math.se page on which it occurs. This means that my posts could be affecting other people's answers and comments.
I'd like to fix this.
There is a simple way to fix this, as explained in this answer to the above question and elsewhere: surround such posts with
$\require{begingroup}\begingroup$
...
$\endgroup$
(My first example can be seen in the source of this answer of mine.)
And I'm perfectly willing to go through all of the above posts, and apply this fix.
However, a disadvantage is that all these posts will suddenly jump to the top of the 'active' lists, for no good reason. That's probably considered bad form. (And there is no way to indicate 'trivial edits', or is there?)
Another disadvantage is that occasionally people have used a \newcommand
of mine in a comment on that post. So using begingroup
would make those start to fail.
Finally, the actual chance of having a conflict is low, except in those cases where I've used something like \newcommand{\equiv}{\Leftrightarrow}
to redefine a predefined MathJax command. So going back applying this fix might not be worth it.
So my question is: Should I fix this?
\newcommand
". Perhaps, you're "making a mountain out of a mole hill." However, Kudos to you, for asking on meta about your options, and being open to suggestions. $\endgroup$