I have noticed a curious bug in the way MathJax is setup on MSE. MathJax has feature to zoom its formulas via "Math Settings -> Zoom Trigger" menu option. I normally use this menu option and set double-click as the Zoom trigger and zoom setting to 200% so that double clicking zooms the content to twice the size (note that double-click opens up a new window where it shows the zoomed content) . It is helpful in viewing formulas having lot of small subscripts or superscripts.

However this zoom splits a single line formula into multiple lines and this makes it difficult to grasp the formula when viewed in zoom mode. I use MathJax in my blog (in the blog the zoom trigger is defaulted to double click) and there I don't see this problem. Probably some settings in MathJax is not proper and should be fixed by modifying the css files.

Image of the formula given by Asaf Karagila in comments is shown below:

enter image description here

Another image showing the same formula in one line (I don't know what triggers the split shown above and BTW split is seen most frequently and one line is rare):

enter image description here

Update: I use the following configuration for mathjax in my blog css and I don't find this issue on my blog. Perhaps that may help:

  <script type='text/x-mathjax-config'>
  MathJax.Hub.Config({ messageStyle: "none", TeX: { equationNumbers: { autoNumber: "AMS" }, extensions: ["autobold.js"] }, tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, processEscapes: true, menuSettings: { zoom: "Double-Click" }});
  <script src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>

Further Update: I checked that this issue is specific to MSE only. The MO site does not have this problem. You can see the equation $(1)$ in question on MSE and the same question on MO. This I find very difficult to accept.

  • $\begingroup$ Perhaps it would be wise to add a formula that shows that splitting up. For example: $$\sum x_n=\sum\sum y_{nk} = \iint f(x,y)\operatorname{d}xy=\frac{\aleph_{\omega+1}}{2\pi}=\aleph_{\omega+1}=\aleph_\omega^{\aleph_0}=\infty$$ (Yes, a part of me just died a little for using $\aleph_{\omega+1}$ there!) The code is this: \sum x_n=\sum\sum y_{nk} = \iint f(x,y)\operatorname{d}xy=\frac{\aleph_{\omega+1}}{2\pi}=\aleph_{\omega+1}=\aleph_\omega^{\aleph_0}=\infty $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:08
  • $\begingroup$ (And apparently, it works just peachy in the comments. So this must be something inherent to the question/answer boxes.) $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:10
  • $\begingroup$ @AsafKaragila: The formula you gave in comment is a nice example. It shows as split into 4 lines. i will update a screenshot of it. $\endgroup$ – Paramanand Singh Aug 28 '14 at 7:12
  • $\begingroup$ It actually showed in a single line for me (even with a scrollbar!); but I have seen that problem in some answer (after I tried it when I saw this post). $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:14
  • $\begingroup$ @AsafKaragila: I have put a screenshot. But you need to believe me. Something even strange happened when I was typing this comment. I just double clicked your formula for zoom and then it showed in one line. And after the comment is done I reload the page fresh it seems to have the same issue. I will post that single line screenshot also. $\endgroup$ – Paramanand Singh Aug 28 '14 at 7:20
  • $\begingroup$ Thanks @AsafKaragila for the large formula! $\endgroup$ – Paramanand Singh Aug 28 '14 at 7:24
  • $\begingroup$ Ah, yes, that is the same here. I suspect that when adding a new comment the zoom in the comments gets solved somehow by the addition of content. Perhaps you could add the actual formula to your question, and then we'll see if adding a comment fixes this globally, or locally in the comments. $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:32

The SE sites have automatic line breaking enabled, whereas your blog doesn't. That setting applies to the zoom box as well as the original expression, and since the zoom box is smaller in width and the font is larger, you will likely get more line breaking in the zoomed version.

The reason that this only happens sometimes is that I think there is a bug with the zoom code that doesn't reset the wrapping width properly after a zoom, and so sometimes you are getting wrapping and sometimes not. There is an open Mathjax issue tracker for this issue. It should set the line breaking width to the scaled size of the original equation's line breaking width, so that the line breaking will be the same in the zoom and the original.

  • $\begingroup$ Let's hope mathjax team fixes the issue soon. $\endgroup$ – Paramanand Singh Aug 28 '14 at 15:24
  • $\begingroup$ I added further update in question which shows that the issue is specific to MSE. MathOverflow does not have this problem. I wonder what is the real issue. $\endgroup$ – Paramanand Singh Sep 9 '14 at 16:22
  • $\begingroup$ The issue is as I said it was: the line-breaking width is not being reset properly for the zoom box. The difference between the two sites is the fact that MSE has the "Hot Questions" sidebar, and when there is math in any title there, the line-break width is set to the width of that sidebar. Since that is the last math processed, that is the width left in play when you do the zoom on the main part of the page. In MO, there is no hot question sidebar, and so the line width is left at the width of the main column. $\endgroup$ – Davide Cervone Sep 9 '14 at 17:01
  • $\begingroup$ @DavideCervone But I observe (empirically) that SE now excludes questions with math in titles from Hot Questions. I have been unable to get them to confirm or deny. $\endgroup$ – user147263 Sep 9 '14 at 17:18
  • $\begingroup$ Sorry, I miss spoke. It is the related questions, not Hot Questions sidebar that generally includes the math. Either way, the last math processed is in a small container, and that container size is being retained for the zoom window. I have confirmed this in the code, and am in the process of fixing it. I assure you, this is the problem. $\endgroup$ – Davide Cervone Sep 10 '14 at 10:24

This is a test answer, with a formula, to determine more about the problem: $$\sum x_n=\sum\sum y_{nk} = \iint f(x,y)\operatorname{d}xy=\frac{\aleph_{\omega+1}}{2\pi}=\aleph_{\omega+1}=\aleph‌​_\omega^{\aleph_0}=\infty$$


When adding a comment, the issue is resolved throughout the page, until the next reload when it breaks down again.

  • $\begingroup$ Okay, so in the preview for the answer, it worked fine, but after posting it didn't work very well. What about comments, then? $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:33
  • $\begingroup$ Let's try the magic formula again... $$\sum x_n=\sum\sum y_{nk} = \iint f(x,y)\operatorname{d}xy=\frac{\aleph_{\omega+1}}{2\pi}=\aleph_{\omega+1}=\aleph‌​_\omega^{\aleph_0}=\infty$$ $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:34
  • $\begingroup$ So when I added the comment, it solved the issue in the answer as well. That seems a bit odd. Let's see if it works globally through the entire page, too. EDIT: Yes, adding a comment "fixes" the problem temporarily throughout the page. $\endgroup$ – Asaf Karagila Aug 28 '14 at 7:35
  • $\begingroup$ My observation is that when you post something then things are OK. But suppose you reload that page (to make it fresh) then the problem appears. $\endgroup$ – Paramanand Singh Aug 28 '14 at 7:35
  • $\begingroup$ I have updated the question with my mathjax configuration which i use in my blog. $\endgroup$ – Paramanand Singh Aug 28 '14 at 7:48
  • $\begingroup$ There is an "uncaught error: restart" from MathJax in the Javascript console when I try to zoom. That might be the source of the problem. $\endgroup$ – Mad Scientist Aug 28 '14 at 10:30
  • $\begingroup$ I added further update in question which shows that the issue is specific to MSE. MathOverflow does not have this problem. I wonder what is the real issue. $\endgroup$ – Paramanand Singh Sep 9 '14 at 16:23

You must log in to answer this question.

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