# calculated sizes of things #580

Closed
opened this issue Sep 22, 2013 · 13 comments

Projects
None yet
3 participants

### jcmckeown 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?
Member

### dpvc 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?
Author

### jcmckeown 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 The output html is eπx2dx  Next, SVG output
Member

### pkra 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?
Author

### jcmckeown 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.
Author

### jcmckeown 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.
Author

### jcmckeown commented Sep 25, 2013

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

### jcmckeown 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?)
Member

### pkra commented Sep 30, 2013

 This could be related to this
Member

### dpvc 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.
Author

### jcmckeown commented Dec 23, 2013

 Hurrah! that does nicely for now!

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

 Add '!important' to CSS for display property. Resolves issue mathjax#580 
.
 4f10613 

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

 Added '!important' to NativeMML CSS as well. (Issue mathjax#580.) 
 72f9d5f 

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

 Merge branch 'issue580' into develop. Issue mathjax#580. 
 cdcc04d 
Member

### dpvc commented Feb 7, 2014

 => Merged

Member

### dpvc 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".
Member

 +1