# Stack Exchange sites with MathJax incorrectly crop the zoomed version of LaTeX

Stack Exchange sites that support MathJax sometimes can not handle heavy equations / a lot of symbols such as a to the power of b to the power of c etc...:

The symbols get too small. Now this is of course understandable, but, when you want to view the zoomed version (right click - zoom trigger) of an equation that use $$(which supposed to be the bigger latex version, using XYZ works fine but$$XYZ$$does not): And then hover / click / double-click over the equation, you see a cropped image. Note, this is actually what you see, I did not crop this image: This is not a LaTeX bug, because I've seen many sites that support LaTeX and the zoom, for both  and$$ works just fine.. I am using Google Chrome (I've now checked on Firefox as well - same problem)

• Well, as one who's put-off learning LaTeX for s few years, I'm no expert. I'd suggest leaving it here for now, but searching for similar problems on math meta, maybe even on meta.mathoverflow if you're a member at mathoverflow, you may find helpfull insight, even enough to post an answer to your own question.
– W.O.
Jul 11, 2020 at 22:18
• There are many sites that use MathJax (btw, there is a difference with LaTeX). This question is more than on-topic here. Jul 11, 2020 at 23:09
• On topic here. Affects a broad subset of sites and might need dev time
– Journeyman Geek Mod
Jul 12, 2020 at 7:18
• This is on our list to address. It looks like there's CSS that's interfering here, so going to dig into this more and will update here once we get to it.
– Jon Chan StaffMod
Aug 5, 2020 at 20:43

Edit 2: We're marking this as :

My previously proposed fix didn't work. We need to be more mindful of how fix this without introducing more problems. We spent some time discussing but weren't able to come up with a great solution that kept the original problem fixed.

A better solution probably exists, we just weren't able to find it without moving some CSS mountains.

Edit: This fix has been temporarily reverted because of some other bugs it introduced. [1] [2]

This has been fixed! The other answer had correctly identified that this line was causing the problem:

.MathJax_SVG_Display, .MathJax_Display {
overflow: auto hidden;
}


This was intended to show a horizontal scrollbar when necessary, but it had the unintended side effect of breaking this overlay.

You would think we could just change this to overflow: auto visible, but the spec doesn't allow this behavior.

Instead, I've changed the horizontal scrollbar to be on the entire post when necessary instead of on individual MathJax blocks. This means that the overlay now works as expected and the horizontal scrollbar only appears when absolutely necessary for horizontally large MathJax blocks:

• Kyle, I was playing with this a bit today, and at first glance the overarching problem seems to no longer be the case. If I switch off, just completely remove the overflow:hidden part it doesn't appear to mess with the new user banner. Would you care to revisit this? It might have to do with moving a lot of things to Stacks I'd guess. May 10 at 11:39

OK, it looks like StackExchange has CSS that is causing the problem. In their primary.css file is the declaration

.MathJax_SVG_Display, .MathJax_Display {
overflow: auto hidden;
}


that causes anything outside the vertical space of the original expression to be hidden. That is what is causing he clipping for you. This is an error in the StackExchange CSS, so probably needs to be reported to them as a bug (I'm not sure what would have prompted them to add this CSS, but there is probably something they are trying to prevent by using it).

It would be possible to use something like TamperMonkey to override that CSS, if you wanted. Fortunately, however, the CSS only affects HTML-CSS output and SVG output, so if you switch to CommonHTML output, the CSS will not affect that, and the zooming will work properly.

I didn't see the issue myself because I have CommonHTML output selected (it is faster).

I am not able to reproduce your results. Zoom works as expected for me. Here is your example that you can run here:

<script src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_CHTML"></script>

$$a^{{b^c}^{d^e}}$$

which produces this for me:

If that isn't how it looks for you, can you give the browser version numbers and the OS that you are working in? And can you link to a page on StackExchange where that is happening for you?

EDIT: Here is the math.stackexchange page for me:

This works as expected for me

• It happens not on snippets but on the sites themselves, I am not sure if there's a difference or not but it happens in every other place, I can give some examples: math.stackexchange.com/questions/3753742/… and even in the physics section: physics.stackexchange.com/questions/563333/… (try going to zoom trigger - double click) and then double click on the LaTeX Jul 12, 2020 at 13:43
• The pages you link to work for me. I've added an image one one in the answer above. What OS are you using? And what MathJax renderer (HTML-CSS, CommonHTML, SVG, etc.)? Finally, do you have any plug-ins or extensions that might be interfering with the output? (Can you try turning off plugins?) Jul 12, 2020 at 14:32
• Also, am I right to assume that the snippet that is in my answer above works properly for you? You seem to imply that, but I want to be explicit about that. Jul 12, 2020 at 14:33
• The snippets works fine, the links I gave you do not, I am using Windows 10 and I don't think I have anything that interferes with the engine, also, how do I check which mathjax engine I have? Thank you! Jul 12, 2020 at 14:35
• Use the MathJax contextual menu and look at Math Settings then Math Renderer. Jul 12, 2020 at 14:37
• OK, I can reproduce in Chrome on Windiows 10. I'll look into it further... Jul 12, 2020 at 14:41
• I've determined the issue and have updated my answer above. Jul 12, 2020 at 14:56
• Awesome, nice catch! Should you report it as a bug / I do it? or maybe it isn't a bug? Thank you! Jul 13, 2020 at 0:07