Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculated sizes of things #580

Closed
jcmckeown opened this issue Sep 22, 2013 · 13 comments

Comments

Projects
None yet
3 participants
@jcmckeown
Copy link

commented Sep 22, 2013

(this may be part of another issue; I don't know.)

For visual, see comments on this page --- problem arises at least in firefox 24.0 (debian 7.1) in either html+css or svg rendering, the sizes of math elements (the whole and individual characters) are badly wrong. MathML produces something reasonable.

I don't believe this is related to the backslash-dropping issue Christian Perfect has dealt with. I suppose it might be related to the css region flow issue?

@dpvc

This comment has been minimized.

Copy link
Member

commented Sep 22, 2013

Can you provide a screen snapshot exhibiting the problem? For me the main page displays fine, but the comments are not processed at all (I suspect that the comments may be added in via ajax after the main page has been processed). If I re-run MathJax after the page is visible, then the comments are processed and they appear correct to me. (The first comment is not typeset because there are no backslashes before the brackets, but the second one is.)

So I'm not quite sure what the sizing issue is that you are reporting. Can you be more specific about what is wrong and what you actually see?

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Sep 22, 2013

OK, I've now successfully hooked-in a Queue call to the intensedebate comment loader. I don't know why it was even rendering for me last night! I don't know if it affects anything, but my laptop is an amd x86_64 (E-series processor).

The browser's rendering of HTML+CSS output first

mathjax-weird-htmlcss

The output html is

<span style="width: 4587430em; display: inline-block;" id="MathJax-Span-715" class="math"><span style="display: inline-block; position: relative; width: 1977340em; height: 0px; font-size: 232%;"><span style="position: absolute; clip: rect(61.17em, 1000em, 86.529em, -15.485em); top: -81.034em; left: 0em;"><span id="MathJax-Span-716" class="mrow"><span style="font-family: STIXGeneral; vertical-align: -0.002em;" id="MathJax-Span-717" class="mo">∫<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.18em;"></span></span><span style="padding-left: 0.188em;" id="MathJax-Span-718" class="msubsup"><span style="display: inline-block; position: relative; width: 38015.6em; height: 0px;"><span style="position: absolute; clip: rect(75.421em, 1000em, 86.218em, -15.486em); top: -81.034em; left: 0em;"><span style="font-family: STIXGeneral; font-style: italic;" id="MathJax-Span-719" class="mi">e</span><span style="display: inline-block; width: 0px; height: 81.034em;"></span></span><span style="position: absolute; top: -1086.57em; left: 22.414em;"><span id="MathJax-Span-720" class="texatom"><span id="MathJax-Span-721" class="mrow"><span style="font-size: 1379.3%; font-family: STIXGeneral;" id="MathJax-Span-722" class="mo">−</span><span style="font-size: 1379.3%; font-family: STIXGeneral; font-style: italic;" id="MathJax-Span-723" class="mi">π<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.441em;"></span></span><span id="MathJax-Span-724" class="msubsup"><span style="display: inline-block; position: relative; width: 707.993em; height: 0px;"><span style="position: absolute; clip: rect(1074.95em, 1000em, 1091.53em, -15.89em); top: -1086.21em; left: 0em;"><span style="font-size: 1379.3%; font-family: STIXGeneral; font-style: italic;" id="MathJax-Span-725" class="mi">x<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.041em;"></span></span><span style="display: inline-block; width: 0px; height: 1086.21em;"></span></span><span style="position: absolute; top: -1091.21em; left: 348.338em;"><span style="font-size: 1379.3%; font-family: STIXGeneral;" id="MathJax-Span-726" class="mn">2</span><span style="display: inline-block; width: 0px; height: 1086.21em;"></span></span></span></span></span></span><span style="display: inline-block; width: 0px; height: 1086.21em;"></span></span></span></span><span style="font-family: STIXGeneral; font-style: italic;" id="MathJax-Span-727" class="mi">d<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.027em;"></span></span><span style="font-family: STIXGeneral; font-style: italic;" id="MathJax-Span-728" class="mi">x<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span></span><span style="display: inline-block; width: 0px; height: 81.034em;"></span></span></span><span style="border-left: 0em solid; display: inline-block; overflow: hidden; width: 0px; height: 42.833em; vertical-align: -4.747em;"></span></span>

Next, SVG output

mathjax-weird-svg

@pkra

This comment has been minimized.

Copy link
Member

commented Sep 23, 2013

I see the same as the first screen shot on FF 24, linux.

@jcmckeown are you using Christian's MathJax plugin for intensedebate?

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Sep 23, 2013

@pkra , I tried it, and it prevented the comment system even appearing; his version seems to assume that the ambient page doesn't include mathjax, or some such thing, but I don't know if that's related.

I have been slowly putting together another; the escapes issue can be got around by inverse filters at comment submission and load time.

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Sep 23, 2013

I can add a note that the particular over-large sizes seem to depend on fonts in the ambient page's css.

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Sep 25, 2013

... OK, I've asked the firefox people if they can figure out what's going on.

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Sep 27, 2013

Frédéric Wang locates the difficulty in an intensedebate script-inserted css rule,

#idc-container span { display : inline ; } 

Meanwhile, intensedebate have gone home for the weekend; on Monday I can ask them if they really need that rule there. I haven't figured yet how to reliably get rid of it, once it is there, before queueing a typeset, and it feels awfully crufty to...

I don't suppose there's a sane way to improve the specificity of mathjax's styles? (or could I repeat the necessary specificity in the i.d. plugin?)

@pkra

This comment has been minimized.

Copy link
Member

commented Sep 30, 2013

This could be related to this

@dpvc

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

OK, I figured out what the problem is. Fred's identification of the CSS line that causes the problem suggested that it is the same issue from this forum post. One solution for now would be to add

.MathJax_ExBox, .MathJax_EmBox, .MathJax_SVG_ExBox, .MathJax_mmlExBox {
    display:block ! important;
}

to your CSS. It turns out that MathJax uses span's with display:block to measure the size of the em and ex, and this CSS overrides that.

I guess the CSS for these elements should use ! important to make it harder for author CSS to interrupt it.

@jcmckeown

This comment has been minimized.

Copy link
Author

commented Dec 23, 2013

Hurrah! that does nicely for now!

dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 6, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 6, 2014

dpvc pushed a commit to dpvc/MathJax that referenced this issue Feb 7, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented Feb 7, 2014

=> Merged

@dpvc

This comment has been minimized.

Copy link
Member

commented Apr 22, 2014

I can't seem to reproduce the circumstances that cause the problem, so I'm marking this "do not write test".

@pkra

This comment has been minimized.

Copy link
Member

commented Apr 22, 2014

+1

@dpvc dpvc added v2.4 and removed Merged labels Jun 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.