8

Update: Thanks to Rob's comment about Davide's answer, I realized I forgot that I had changed my MathJax renderer from the default "HTML-CSS" to "Common HTML" a few days ago. Although this change fixed my issue with the bottom of some equations being cut off, it caused the problem with longer MathJax equations I describe below. With the default renderer of "HTML-CSS" being used instead, the equations are now shown in scrollable windows, such as the Prove that $n$ and $n + k$ are both primes if and only if $(k!)^2[(n - 1)! + 1] + n(k! - 1)(k - 1)! \equiv 0 \mod n(n + k)$. post I mention in my original question text:

Smaller window showing longer MathJax display equations now show in scrollable windows

Note I haven't tried any of the other math renderer options, or know if using "Common HTML" is supposed to not have the problem of being cut on the right side when it's too long. For anybody interested, I'm leaving my original question text below.


In the past, I've seen both for my own posts and other posts, when a MathJax display (i.e., one surrounded by $$ on either side) equation was too long to fit in its display area, it would be shown in a scrollable window, with a horizontal scroll bar at the bottom, so you can see the left part and scroll the window to see the rest if so desired. However, I noticed recently that this does not appear to be happening any more. For example, with Prove that $n$ and $n + k$ are both primes if and only if $(k!)^2[(n - 1)! + 1] + n(k! - 1)(k - 1)! \equiv 0 \mod n(n + k)$., shown in a full window on my monitor at 1280 x 1024 resolution, I see

Full screen image of the math question, with all equations showing

However, when I make the display somewhat smaller, I then see this

Partial screen image of the math question, with some equations cut off on the right

Some of the equations are now cut off on the right side under the "Featured on Meta" or "Hot Meta Posts" sections, and one equation overwrites the white space just above the "Hot Network Questions" section.

For this particular question, I can just use the full screen. However, there were 2 questions I saw earlier today, but I don't recall which ones now, where even at full screen size they had equations being cut off. Although I could have tried changing my display to use a higher resolution and/or landscape mode, I wasn't sure if that would be sufficient. Instead, I just displayed the question in the editor to see the MathJax code of the non-visible parts.

Note this same issue also applies to longer equations being used in answers, and I believe it's not just on the Math SE site but is also a problem with any site using MathJax. Also, I suspect this issue is due to a relatively recent change related to handling responsive design, with it possibly even affecting other parts of the posts' display than just longer MathJax equations.

5
  • See also Davide's answer while you wait. BTW: OK on Firefox Android. – Rob Sep 2 '20 at 0:35
  • 1
    @Rob Thanks for the reminder. I forgot I changed my Math Renderer from the default "HTML-CSS" to "Common HTML" to fix a display issue with the bottom cut off of some equations. When I switched back to "HTML-CSS", the problem of the right side being cut off no longer occurs now. I'll update my question to address this. – John Omielan Sep 2 '20 at 0:41
  • @JohnOmielan Did the issue with the bottom getting cut off re-appear when you switched the renderer back? Or are we lucky enough to have a "two for one" here? – Adam Lear Sep 2 '20 at 1:22
  • 1
    @AdamLear The bottom is now getting cut off again. However, since it's only a few pixels, and it only occurs relatively rarely, it's better for me to generally keep the renderer at "HTML-CSS" rather than use "Common HTML". As for the latter option, I'm not sure if it's known, and an expected limitation, that longer MathJax display equations are cut off on the right. I considered deleting my question, but decided to keep it, with an appropriate update, in case anybody else encounters this issue, plus if there's any reasonable chance the "Common HTML" renderer can be fixed to avoid this issue. – John Omielan Sep 2 '20 at 1:27
  • 1
    @JohnOmielan Yeah, this is gonna be fairly low priority, but it can't hurt to check out what's going on and see if we can fix it up. I don't think we'd be switching the default renderer, but who knows, maybe there'd be a reason eventually. Thanks for the updates! – Adam Lear Sep 2 '20 at 1:29
1

Thanks for raising this. It seems like your original report was addressed by changing the renderer, but there's still some investigation worth doing when it comes to horizontal scrollbars and some vertical clipping, which we've recently started investigating for a related report. I'm marking as for now.

You must log in to answer this question.

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