Mathjax supports automatic equation numbering:

And equation references:

The extra code to support this seems to be something like:

<script type="text/x-mathjax-config;executed=true">
  MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "AMS"} } });

Would this be an useful feature at MSE ?

  • $\begingroup$ Are you suggesting to number/label all equations so that? Would it be an option to turn this off if one doesn't want the equations numbered? $\endgroup$ – Thomas Oct 4 '13 at 22:53
  • 3
    $\begingroup$ @Thomas: This seems to be about allowing for both starred and un-starred versions of many LaTeX environments (e.g., \gather for automatically numbered equations, and \gather* for unnumbered). Currently math.SE only supports unnumbered equations (augmented by \tag{}). The unfortunate bit is that we use un-starred names for these unnumbered environments, meaning that implementing this feature would also require that all posts be (automatically, hopefully) processed to change each \gather to \gather*, and similarly for the other environments. $\endgroup$ – user642796 Oct 5 '13 at 5:40
  • 2
    $\begingroup$ I think using \tag as needed is a better solution than something that requires updating a lot of posts. $\endgroup$ – Lord_Farin Oct 5 '13 at 8:29
  • $\begingroup$ Didnt think about the old posts... Hmm lord farin is probably right $\endgroup$ – Kasper Oct 5 '13 at 8:50
  • 1
    $\begingroup$ @Lord_Farin: The old MO used an old version of MathJax which would occasionally (often?) require the doubling of backslashes (so $\{ x \in X \cdots$ would be typed \\{ x \in X \cdots) and it was not always obvious when this would be required. When they switched over to the SE 2.0 network no-one manually went through and updated all of these codes; the conversion was automated as much as possible. If we request this feature we would also have to request scripts to be written/run that would "fix" all of our present posts. I don't believe that this is a reason to vote against this proposal. $\endgroup$ – user642796 Oct 5 '13 at 10:33
  • $\begingroup$ Perhaps the most troubling bit would be that math.SE would have to go down for some period of time while all of this is updated. Then again, this might be a good thing. $\endgroup$ – user642796 Oct 5 '13 at 10:35
  • $\begingroup$ @Arthur That takes some of the worries away. Nonetheless, I still consider this (more or less) a solution looking for a problem that it fixes. In the MO case, the advantage was clear: SE1.0 wasn't maintained and had some serious issues. Not so for this one. $\endgroup$ – Lord_Farin Oct 5 '13 at 10:57
  • 1
    $\begingroup$ @Lord_Farin I think the main benefit of this would be that it works the same way as latex works. $\endgroup$ – Kasper Oct 5 '13 at 11:52
  • $\begingroup$ @ArthurFischer: Ok, that is what I thought, but I wasn't sure. So how would the $$ ... $$ work with this? $\endgroup$ – Thomas Oct 5 '13 at 13:21
  • 1
    $\begingroup$ @Thomas It is explained here: docs.mathjax.org/en/latest/… $\endgroup$ – Kasper Oct 5 '13 at 13:39
  • 1
    $\begingroup$ @Kasper: That is a long document and I couldn't quickly find an answer. My specific question is: if we turn on this automatic labeling, will stuff between $$ ... $$ automatically be labeled? $\endgroup$ – Thomas Oct 5 '13 at 21:51
  • $\begingroup$ @Thomas "Equations can be numbered in two ways: either number the AMSmath environments as LaTeX would, or number all displayed equations (the example above uses AMS-style numbering)." Using the setting: equationNumbers: {autoNumber: "AMS"} you get the exact same result as latex. So $$ ... $$ won't be automatically numbered. $\endgroup$ – Kasper Oct 5 '13 at 21:59

I'd also like to see this implemented, though it should only be activated on posts that will have been edited since in order to avoid suddenly having labels on everything put in unstarred environments like align and equation. As Arthur suggested similar to the now fixed \\ escaping issue this could probably be automated in an easy way by appending a star to all the relevant environments.

As a sidenote, it is possible to tag/label/(eq)ref equations (see source), although the preview of blocks containing \labels will be broken...


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .