2
$\begingroup$

In this answer of mine, I labeled my equation using \label{eq:boltzmann} and then tried to cite it in the usual LateX way: \eqref{eq:boltzmann}. That is at least the way I've been used to it since first starting to use LaTeX in 2007.

It is also the way that we have labeled and referenced equations in all of the papers that I have written as a team with other co-authors.

It is also the way that LyX generates TeX code when I label and reference equations using the LyX GUI.

However, the equation referencing on this Stack Exchange site didn't work as expected, and eventually Tyberius figured out that we had to add the \tag{1} command, in addition to what we normally would do. I would never have known that!

After searching a bit, I found here, that the expected behavior can be obtained by simply adding:

window.MathJax = {
  tex: {
    tags: 'ams'
  }
};

to the MathJax config file. I wonder whether it would be worth it for us to request Adam Lear (for example), to add this to our MathJax configuration file? It seems simple enough, and I see no disadvantages to is (let's see what the people responding to this Meta question say). Perhaps the SE team has concerns that other sites might not want this, but I would think they all want it for sure (if it's a concern, maybe I could ask this on other Meta sites too).

Every paper I've published, whether in chemistry, or physics, or mathematics, or quantum computing, has always used ams (American Mathematical Society) templates, so this is why I think this would benefit all the other SE sites too (if they don't already have this configuration set!).

If we do wish to have this feature, and the SE staff do not mind supporting it, I wonder if our community would also like us to make use also of the following (from the same article I linked above):

It is also possible to set the tagging to ‘all’, so that every displayed equation will get a number, regardless of the environment used.

In all my papers I always number all equations, and I encourage my students to do so as well. This is because, even if you never need to refer to an equation in your paper (or SE answer), someone else might want to refer to it: In that case we do not want them to have to say something like "it is explained in the second equation between Eq. 2 and Eq. 3 of this answer on Stack Exchange". They should just be able to say "it is explained in Eq. X of this answer on stack exchange".

| |
$\endgroup$
  • 2
    $\begingroup$ MathJax is not LaTeX, it only borrows a limited set of syntax from it. I'm pretty certain that automatic enumeration will produce significant overhead for loading. Especially for MathJax heavy q&a it will be painfully. Since you can tag and label manually I don't think it really is necessary. Also, labelling would make it dynamically, so referring to an equation with a static number that may change is a bummer. In the SE spirit, every answer should be self-contained, so just copy the equation and link to the context would always be a better way than to just refer to another page. $\endgroup$ – Martin - マーチン May 29 at 10:01
  • $\begingroup$ I highly doubt that it would "produce significant overhead for loading" or be "painful". It's 1 line added to the MathJax config file, and the year is 2020: Most of us are not browsing SE from a dial-up modem. $\endgroup$ – Nike Dattani Jul 31 at 2:53
  • $\begingroup$ The bottleneck won't be the connection but the rendering in the browser, and that is going to be painful for some of us. But I also don't care anymore, especially not enough to having an argument about it. $\endgroup$ – Martin - マーチン Jul 31 at 22:01
1
$\begingroup$

It probably would be worth it. Anything we can do to make the transition to the site less jarring for people who are used to a certain way of doing things will probably be beneficial.

I imagine it won't be problem for inexperienced users who won't use much latex anyway, but the researchers who join the site will expect things to work a certain way.

| |
$\endgroup$
-1
$\begingroup$

In this example things start to get a bit messy. The user has numbered some equations but not others. If we re-number the equations to be consistent with other answers where all equations are numbered 1 to N from top to bottom, then a fair amount of the prose part of the answer will have to also be adjusted, which is quite sub-ideal in my opinion.

| |
$\endgroup$

You must log in to answer this question.

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