Last modified: 2014-10-19 15:08:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72119, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70119 - SVG height incorrect
SVG height incorrect
Status: RESOLVED FIXED
Product: Mathoid
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: physikerwelt
http://en.wikipedia.beta.wmflabs.org/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-28 10:37 UTC by Derk-Jan Hartman
Modified: 2014-10-19 15:08 UTC (History)
4 users (show)

See Also:
Web browser: Apple Safari
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
screenshot (87.54 KB, image/png)
2014-08-28 10:37 UTC, Derk-Jan Hartman
Details

Description Derk-Jan Hartman 2014-08-28 10:37:01 UTC
Created attachment 16303 [details]
screenshot

I tested the MathML SVG mode and it seems that the height is incorrect and the bottom of the image is cut-off.

http://en.wikipedia.beta.wmflabs.org/wiki/User:Physikerwelt

screenshot attached. Apple Safari
Comment 1 physikerwelt 2014-08-28 12:32:07 UTC
Thanks for reporting this.
I'm not sure if that's a problem of the Math extension of a problem of the SVG itself.
Does the SVG http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:MathShowImage&hash=826676a6a5ad24552f0d5af1593434cc&mode=5 cropped for you as well?
Comment 2 physikerwelt 2014-08-28 12:55:31 UTC
I played a bit with the options. I think the hight is too small. If we'd add a few percent to the height the problem would be solved. Do you think that would be a good solution?
Comment 3 Frédéric Wang 2014-08-28 16:41:48 UTC
Does MathJax still returns the image height in relative CSS units (ex)? I'm not sure we can be convert them reliably into px...
Comment 4 Peter Krautzberger 2014-08-28 17:46:42 UTC
I don't think the problem is in the height (increasing it will only scale the image) but other CSS effects, leading to clipping. From a quick try, stripping the style from the SVG seems to fix this so perhaps having the inline style both within the SVG and on the img tag is causing trouble.
Comment 5 Derk-Jan Hartman 2014-09-03 14:15:48 UTC
Found it.

It's primarily the styling on the SVG element itself. That adds two 2px of margin (which are not part of the SVG sizes). 

Then on the inline image element, we add another 2px. Remove those two and everything works just fine.
Comment 6 Derk-Jan Hartman 2014-09-03 14:21:53 UTC
You can test on http://en.wikipedia.beta.wmflabs.org/wiki/User:Physikerwelt by replacing the img url of the mathml image to point to:

http://upload.beta.wmflabs.org/wikipedia/en/2/2a/Math-svg-inline-test.svg
Comment 7 physikerwelt 2014-09-04 04:25:53 UTC
That means it's a problem on the server side.
Comment 8 Gerrit Notification Bot 2014-10-09 19:55:24 UTC
Change 165861 had a related patch set uploaded by GWicke:
Bug 70119: Strip style from SVG image

https://gerrit.wikimedia.org/r/165861
Comment 9 Gerrit Notification Bot 2014-10-09 20:02:06 UTC
Change 165861 merged by jenkins-bot:
Bug 70119: Strip style from SVG image

https://gerrit.wikimedia.org/r/165861
Comment 10 Gerrit Notification Bot 2014-10-10 01:01:15 UTC
Change 165949 had a related patch set uploaded by GWicke:
Revert "Bug 70119: Strip style from SVG image"

https://gerrit.wikimedia.org/r/165949
Comment 11 Gerrit Notification Bot 2014-10-10 01:01:29 UTC
Change 165949 merged by GWicke:
Revert "Bug 70119: Strip style from SVG image"

https://gerrit.wikimedia.org/r/165949
Comment 12 Gabriel Wicke 2014-10-10 05:36:31 UTC
This should be basically fixed for new formulas. Old formulas already in the database might still have the old margins, and will need to be cleared.

I believe that one way to do this is is ?action=purge&mathpurge=true, although in my tests that did not work reliably. I'm keeping this bug open until this is verified fixed in production.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links